Configuring Postfix to send mail with relayhost

Quick guides to common configuration tasks with in the web interface of your system

Configuring Postfix to send mail with relayhost

Postby montrealvoip » Thu Jun 17, 2010 1:03 pm

If your ISP (Bell or Videotron for example) requires that mail be sent through their mail servers and they block any other SMTP server asterisk will be unable to send voice mails to you without making the necessary changes.

1) log in as root to you system
2) edit the /etc/postfix/main.cf file and find the following line, the actual smtp server name will be different but we will be changing it to your ISP's SMTP server, so for example relais.videotron.ca
Code: Select all
relayhost = relais.videotron.ca

3) because we require authentication we need to add a user name and password, at the bottom of the main.cf file add the following if not already there
Code: Select all
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

Save the file and exit.
4) next we need to edit /etc/postfix/sasl_password If it is not already present create the file and enter in your credentials as so, replacing the user and passowrd with your own details and the smtp address of your ISP's mail server is not videotron in the below example
Code: Select all
realais.videotron.ca     user:pass

Save the file and exit
5) to enter the password into a db that postfix will use tyoe:
Code: Select all
postmap /etc/postfix/sasl_passwd

6) reload postfix to apply the changes
Code: Select all
postfix reload

If the username and password change at any point steps 3-6 must be repeated.
montrealvoip
Site Admin
 
Posts: 19
Joined: Thu May 28, 2009 9:29 pm

Return to PBX System - Howto Guides

Who is online

Users browsing this forum: No registered users and 1 guest

cron