Relay SMTP through another server with Authentication
Sometimes your ISP blocks 25 port so you need to relay the Email Messages through external authentication server.For that you can use postfix as relay server using following configuration
1. Create password maps file (it assigns username/passwords to specified mail servers). You can choose any name, let's say it is /etc/postfix/relay_passwd. It's content should be as follows: smtp.google.com USERNAME:PASSWORD Note: Replace USERNAME and PASSWORD with your DNS EXIT mail relay username and PASSWORD. USERNAME for google would be username@gmail.com 2. Set proper permissions for that file: # chown root:root /etc/postfix/relay_passwd # chmod 600 /etc/postfix/relay_passwd 3. Create hash from maps file (remember to do it each time you change your maps file): # postmap /etc/postfix/relay_passwd 4. Configure your /etc/postfix/main.cf: relayhost = [SMTP address] smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd smtp_sasl_security_options = Note: If your ISP blocks outgoing port 25. You can choose to use alternative SMTP ports by appending the port at the end: relayhost = [SMTP Address]:26 for gmail it would be [smtp.gmail.com]:587 5. Reload or restart your postfix: # /etc/init.d/postfix restart
Blog Archive
-
►
2010
(79)
-
►
June
(11)
- Protect Web Directories using .htacess
- eth0_rename in ethernet card
- Reset windows password using linux live CD
- IPP printer configuration in windows
- Reinstall WIndows Fax and Picture viewer
- Stream audio in Bluetooth Headset using Dongle
- Convert image files to text
- Configuring exim4 in Ubuntu to use GMail for SMTP
- Change apache2 web directory
- Checking webserver vulnerabilities
-
►
June
(11)
Tuesday, June 7, 2011
relay mails through server with authentication
Subscribe to:
Posts (Atom)

