I don't think that will help me yet (Maybe I am being really stupid or
missing something) How does qmail know that mail that is from domain
mail.domain1.com is to be delivered on IP xxx.xxx.xxx.xxx and that mail from
mail.domain2.com is to be delivered using IP yyy.yyy.yyy.yyy.
At the point that qmail is sending out mail via smtp it no longer knows what
domain it is send out mail for does it?
There has to be some kind of config file that tells qmail-smtpd what domains
to send for. I would expect something like this would have to be done.
A file called smtpddomain1
mail.domain1.com
Another file called smtpdotherdomains
mail.domain2.com
mail.domain3.com
...etc
(I know that the above doesn't exist - just dreaming)
Another thought would be if I could use the domain name on the program line
as below. (That would be a pain to have to add a new smtp file for every
domain that I want to be unique)
> #!/bin/sh
> QMAILDUID=`id -u qmaild`
> NOFILESGID=`id -g qmaild`
> MAXSMTPD=`/bin/cat /var/qmail/control/concurrencyincoming`
> exec /usr/local/bin/softlimit -m 2000000 /usr/local/bin/tcpserver \
> -vPHR -c "$MAXSMTPD" -x /var/qmail/cdb/smtp.cdb \
> -u "$QMAILDUID" -g "$NOFILESGID" mail.domain1.com smtp
/var/qmail/bin/qmail-smtpd 2>&1
>
^^^^^^^^^^^^^^
> run file for mail2.example.com:
>
> #!/bin/sh
> QMAILDUID=`id -u qmaild`
> NOFILESGID=`id -g qmaild`
> MAXSMTPD=`/bin/cat /var/qmail/control/concurrencyincoming`
> exec /usr/local/bin/softlimit -m 2000000 /usr/local/bin/tcpserver \
> -vPHR -c "$MAXSMTPD" -x /var/qmail/cdb/smtp.cdb \
> -u "$QMAILDUID" -g "$NOFILESGID" mail.domain2.com smtp
/var/qmail/bin/qmail-smtpd 2>&1
>
^^^^^^^^^^^^^^