Default installs of openSUSE and SUSE Linux will not be able to send emails. The following simple configuration procedure should help you setup postfix to send emails. Infact, this should work on most of the Linux distros.
The config file for postfix is
Edit this file and set the following values:
1. My Network
This could be a list of networks, IP Addresses from which postfix accepts emails to be sent.
mynetworks = 192.168.0.0/16, 127.0.0.0/8
The above indicates that emails from 192.168.0.0/24 network and 127.0.0.0/8 can be trusted.
Alternatively, you can use a CIDR file to specify the networks or a HASH file to specify individual ipaddresses:
CIDR file format:
127.0.0.0/8 localhost192.168.0.0/16 local LAN10.1.11.1 my PC
The comments in the right hand side are ignored but are required.
To use a CIDR file
mynetworks = /etc/postfix/my_cidr_table
HASH file format:10.9.8.7 OK127.0.0.1 localhost192.168.1.1 sai PC
To use a HASH file
mynetworks = hash:/etc/postfix/my_cidr_table
This sets the interfaces on which the emails to send can be accepted. This again could be an interface name like “lan0″ or an IP Address or “all” to accept on all interfaces.
inet_interfaces = 192.168.1.1, 127.0.0.1orinet_interfaces = allorinet_interfaces = lan0
This is like your default gateway wherein the system delivers the outgoing email to this SMTP server when the system can’t deliver the mail by itself. This is normally your ISPs SMTP/relay server
relayhost = [smtp.myisp.com]
where smtp.myisp.com is your ISPs smtp server.
4. SMTP Authentication using Password Map file
If your ISP uses, SMTP mail authentication which requries a username and password then the following should be done.
Edit the file
and the following entry
smtp.myisp.com is the SMTP server.
ispuser is the username
isppassword is the password.
Make sure, the file is owned by root user and root group and read/write root only.
Annai:/etc/postfix # chown root:root sasl_passwdAnnai:/etc/postfix # chmod 600 sasl_passwd
Map the password map file to postfix
Annai:/etc/postfix # postmap sasl_passwd
Now, edit the main.cf file and modify/add the following entries
smtp_sasl_auth_enable = yessmtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
This should do. Restart postfix for the changes to take effect.
Annai:/etc/postfix # rcpostfix restartShutting down mail service (Postfix) doneStarting mail service (Postfix) done
Make sure, the firewall allows SMTP connections to external zone.
1. Click the Kickoff App launcher, click Computer – Yast.
2. Click “Security and Users” – Firewall
3. Click Allowed Services,select “SMTP with Postfix” and click Add
4. Click Next and Finish.
5. Click Start-Up – “Save Settings and Restart Firewall now”
This should do.