This patch is based on Robert Sander's AUTH LOGIN patch
which is based on the qmail-smtpd-auth patch
which itself is based on the patch from Mrs. Brisby...
Confusing ;)
I made this patch because my ISP also switched to AUTH LOGIN on his SMTP relay and we are using an internal linux qmail server in our company, but the patch Robert wrote was only working for 1 user. . Several users use this ISP for outgoing mail, mails are fetched with fetchmail, (scanned for viruses) and send to the local mailaccounts which is used as relay. Now it is easy for us to internal mailaccounts mapped to the external mailservers. You can even select the outgoing mailserver with the smtproutes_users file.
The username and password for the remote smtp relay are stored in
/var/qmail/control/smtproutes_users (new controlfile!) separated with pipes after the entry for
the relay server.
For example:
#mailuser-example
mail@example.com:smtp.example.com|example.com1|examplePasswd
info@example.com:smtp.example.com|example.com2|anotherPasswd
mailuser-examples sending to port 26
anotherport@example.com:smtp.example.com:26|example.com3|justfoobar
#default, not sure if this entry is used, untested!!!!!! Maybe i had to code this.
:relay.provider.com|username|password
Password has to be stored in cleartext. This is maybe not bug-free, but like Robert said: