tag:blogger.com,1999:blog-7153440860142288256.post-59118750706685936632008-06-06T21:24:00.003+02:002008-06-06T21:30:09.192+02:00Relay mail to your ISP Mail server to avoid spam filters<p align="justify">
Most mailserver blocking the receipt of mail from addresses not registered in dns to avoid spam.
You can use the mail server of your ISP even if requires the authorization.
Follow these instructions if you want to transfer e-mail from your local linux computer to a mail server that
requires SMTP AUTH.<br>
</p>
<span class="fullpost">
<p align="justify">
You should be logged in as root to perform these steps.
Create a safe subdirectory "auth/" where your sendmail configuration files are located, usually /etc/mail/:
</p>
<blockquote><pre>
[root@boss ~]# cd /etc/mail
[root@boss mail]#mkdir auth
[root@boss mail]#chmod 700 auth
[root@boss mail]#
</pre></blockquote>
<p align="justify">
Create a file "authinfo" with the authentication information:
</p>
<blockquote><pre>
AuthInfo:yourisp.domain.com "U:root" "I:user" "P:password"
</pre></blockquote>
<p align="justify">
filling in your ISP's mail server, your user name, and your password.
Some ISP requires the full e-mail address as the user name.
Generate the authentication database and make both files readable only by root:
</p>
<blockquote><pre>
[root@boss mail]#cd auth
[root@boss auth]#makemap hash authinfo < authinfo
[root@boss auth]#chmod 600 authinfo*
[root@boss auth]#
</pre></blockquote>
<p align="justify">
Add the following lines to your sendmail.mc file, filling in your ISP's mail server:
</p>
<blockquote>
define(`SMART_HOST',`yourisp.domain.com')dnl<br>
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5<br>
CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/authinfo')dnl<br>
</blockquote>
<p>
generate sendmail.cf:
</p>
<blockquote><pre>
[root@boss mail]#m4 sendmail.mc > sendmail.cf
[root@boss mail]#
</pre></blockquote>
<br>
<p align="justify">
<strong>Configure header rewriting.</strong><br>
Header rewriting consists in replacing the From: and Reply to: in the header of an outgoing mail in order
for the recipient to reply to a valid address.
This can be set by editing the file /etc/mail/userdb:
</p>
<blockquote><pre>
# /etc/mail/userdb
# <local-name>:mailname <email-adsress>
dettox:mailname dettox@domain.com
</pre></blockquote>
<p align="justify">
create the corresponding database:
</p>
<blockquote><pre>
[root@boss mail]#makemap btree /etc/mail/userdb.db < /etc/mail/userdb
[root@boss mail]#
</pre></blockquote>
<br><p>
restart the sendmail daemon depending on your OS:
</p>
<blockquote><pre>
[root@boss mail]#service sendmail restart
[root@boss mail]#
</pre></blockquote>
<p align="justify">
read this article <a href="http://dettox.blogspot.com/2008/01/automatic-forward-to-another-email.html" title="forward mail">to forward
email received on the server to your daily address.</a>
</p>
<br>
</span>DeTToXhttp://www.blogger.com/profile/10702455931072364257noreply@blogger.com