From: Wietse Venema on
Jonathan Tripathy:
> > You forgot to set an owner rule for @domain.
>
> How would I do that? I'm not sure if this is relavent but I'm currently
> using:

For complete description of

a) the smtpd_sender_login_maps database queries

b) the order of queries

See: http://www.postfix.org/postconf.5.html#smtpd_sender_login_maps

You can test the queries with the postmap command.

postmap -q user(a)example.com databasetype:databasename
postmap -q user databasetype:databasename
postmap -q @example.com databasetype:databasename

Wietse

From: Wietse Venema on
Wietse Venema:
> Jonathan Tripathy:
> > > You forgot to set an owner rule for @domain.
> >
> > How would I do that? I'm not sure if this is relavent but I'm currently
> > using:
>
> For complete description of
>
> a) the smtpd_sender_login_maps database queries
>
> b) the order of queries
>
> See: http://www.postfix.org/postconf.5.html#smtpd_sender_login_maps

You can also specify MULTIPLE maps:

/etc/postfix:main.cf
smtpd_sender_login_maps = mysql:whatever hash:/etc/postfix/default

/etc/postfix/default:
@example.com root

Don't forget to postmap the /etc/postfix/default file.

Wietse

> You can test the queries with the postmap command.
>
> postmap -q user(a)example.com databasetype:databasename
> postmap -q user databasetype:databasename
> postmap -q @example.com databasetype:databasename
>
> Wietse
>
>

From: Jonathan Tripathy on


On 21/02/2010 20:57, Wietse Venema wrote:
> Wietse Venema:
>
>> Jonathan Tripathy:
>>
>>>> You forgot to set an owner rule for @domain.
>>>>
>>> How would I do that? I'm not sure if this is relavent but I'm currently
>>> using:
>>>
>> For complete description of
>>
>> a) the smtpd_sender_login_maps database queries
>>
>> b) the order of queries
>>
>> See: http://www.postfix.org/postconf.5.html#smtpd_sender_login_maps
>>
> You can also specify MULTIPLE maps:
>
> /etc/postfix:main.cf
> smtpd_sender_login_maps = mysql:whatever hash:/etc/postfix/default
>
> /etc/postfix/default:
> @example.com root
>
> Don't forget to postmap the /etc/postfix/default file.
>
> Wietse
>
>
>> You can test the queries with the postmap command.
>>
>> postmap -q user(a)example.com databasetype:databasename
>> postmap -q user databasetype:databasename
>> postmap -q @example.com databasetype:databasename
>>
>> Wietse
>>
>>
>>
>

Great! That seemed to have worked really well! Thanks

Just a couple of questions, it is safe to give @mydomain.com an owner of
root in my hash file?
Also, what are your views on SPF? Just I ditch it, or go for it?

Cheers

From: Wietse Venema on
Jonathan Tripathy:
> > You can also specify MULTIPLE maps:
> >
> > /etc/postfix:main.cf
> > smtpd_sender_login_maps = mysql:whatever hash:/etc/postfix/default
> >
> > /etc/postfix/default:
> > @example.com root
> >
> > Don't forget to postmap the /etc/postfix/default file.
>
> Great! That seemed to have worked really well! Thanks
>
> Just a couple of questions, it is safe to give @mydomain.com an owner of
> root in my hash file?

Use a name that will never be used.

> Also, what are your views on SPF? Just I ditch it, or go for it?

That depends entirely on your users. SPF assumes that mail won't
be forwarded, or that forwarders munge the sender address with SRS.

Wietse

From: Jonathan Tripathy on


On 21/02/2010 21:16, Wietse Venema wrote:
> Jonathan Tripathy:
>
>>> You can also specify MULTIPLE maps:
>>>
>>> /etc/postfix:main.cf
>>> smtpd_sender_login_maps = mysql:whatever hash:/etc/postfix/default
>>>
>>> /etc/postfix/default:
>>> @example.com root
>>>
>>> Don't forget to postmap the /etc/postfix/default file.
>>>
>> Great! That seemed to have worked really well! Thanks
>>
>> Just a couple of questions, it is safe to give @mydomain.com an owner of
>> root in my hash file?
>>
> Use a name that will never be used.
>
>
>> Also, what are your views on SPF? Just I ditch it, or go for it?
>>
> That depends entirely on your users. SPF assumes that mail won't
> be forwarded, or that forwarders munge the sender address with SRS.
>
> Wietse
>

Ok so your solution (Adding another sender login map) worked on my
primary mx. Currently, my backup mx allows "relaying" to my primary mx
using a combination of transport maps and relay_domains. Any ideas on
how to get something similar working for my backup mx? It seems that the
sender_login_maps file is ignored for domains specified in relay_domains.

Thanks