2 ################################################################################
5 # Description: This script sets up ssmtp mail configuration
6 # Author: Andrew@DeFaria.com
7 # Created: Wed Jan 9 12:57:13 2002
9 # Modifications:<modifications>
11 # (c) Copyright 2002, Andrew@DeFaria.com, all rights reserved
13 ################################################################################
14 # Setup /etc/ssmtp config directory
16 domain=${domain:-broadcom.com}
22 # Make some simple aliases. Alias $USER to the proper email address and then
23 # alias root, Administrator and postmaster to the user's address thus making
24 # the user "god" of smtp on this machine only.
25 cat > $ssmtp_dir/revaliases <<EOF
28 # Format: local_account:outgoing_address:mailhub
30 # Example: root:your_login@your.domain:mailhub.your.domain:[port]
31 # where [port] is an optional port number that defaults to 25.
32 $USER:$USER@$domain:$mail_server:25
33 root:$USER@$domain:$mail_server:25
34 Administrator:$USER@$domain:$mail_server:25
35 postmaster:$USER@$domain:$mail_server:25
38 # Get a downshifted hostname
39 hostname=$(hostname | tr '[:upper:]' '[:lower:]')
42 cat > $ssmtp_dir/ssmtp.conf <<EOF
43 # ssmtp.conf: Config file for Cygwin's sstmp sendmail
45 # The person who gets all mail for userids < 10
47 # The place where the mail goes. The actual machine name is required
48 # no MX records are consulted. Commonly mailhosts are named mail.domain.com
49 # The example will fit if you are in domain.com and you mailhub is so named.
51 # Where will the mail seem to come from?
52 #rewriteDomain=$USER.$domain
54 hostname=$hostname.$domain
55 # Set this to never rewrite the "From:" line (unless not given) and to
56 # use that address in the "from line" of the envelope.