Skip navigation.
Home

Article -- Setting up Smart Hosts in Sendmail

Dealing with your ISP's SMTP Filter


It seems that it is becoming more and more common for ISPs to prevent sending of mail directly from your computer. The fashion of the day is to filter port 25 so that you can only send mail through their servers. This is an effort on their part to cut down on the massive amount of Spam currently in circulation. Unfortunately this can cause some inconvenience to us innocent users.

Smart Hosts
A smart host is a computer usually controlled by your ISP whose job it is to relay mail. If you ISP has set this up you must send all outgoing mail to this smart host. Before you can make changes to your system you will need to contact your ISP and find the address of your smart host.

Configuring Sendmail
This is not very difficult. you sendmail configuration files should be located in /etc/mail. Open a file called sendmail.mc and we will add the following line.

define(`SMART_HOST', `mail.isp.net')

Then convert the file into a sendmail correct format with this command and restart sendmail.

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
/etc/init.d/sendmail restart


Using Passwords

create a file called /etc/mail/authinfo
Containing:
AuthInfo:myisp.com "U:UserName" "I:UserName" "P:YoUrPaSSw0rd"
You may need to install sasl.
apt-get install libsasl2-modules
More Help This will work for many service providers but if you have any problems please leave a comment on this page and I will add information for you provider.