OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: 553 5.7.1 Sender address rejected: not logged in

From: AlxFrag (alxfraggmail.com)
Date: Fri May 16 2008 - 03:58:40 CDT


mouss wrote:
> AlxFrag wrote:
>> mouss wrote:
>>> AlxFrag wrote:
>>>> Hi,
>>>>
>>>> I've setup postfix as following:
>>>>
>>>> In main.cf:
>>>>
>>>> smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
>>>>
>>>>
>>>> smtpd_sender_login_maps=ldap:/etc/postfix/local_recipients.cf
>>>>
>>>> smtpd_sender_restrictions=permit_mynetworks,check_sender_access
>>>> hash:/etc/postfix/block_senders,hash:/etc/postfix/my_domains,reject_authenticated_sender_login_mismatch
>>>>
>>>>
>>>> smtpd_restriction_classes=verify_login
>>>>
>>>> verify_login=reject_sender_login_mismatch
>>>>
>>>> One of my users usermydomain owns another account to an external
>>>> server userexternal_domain.
>>>>
>>>> In that domain he has placed an alias so as every mail sent to
>>>> userexternal_domain is redirected to usermydomain.
>>>>
>>>> Whenever i try to send an email from my account postmastermydomain
>>>> to userexternal_domain i get the following error:
>>>>
>>>> ----- The following addresses had permanent fatal errors -----
>>>> <usermydomain>
>>>> (reason: 553 5.7.1 <postmastermydomain>: Sender address
>>>> rejected: not logged in)
>>>
>>>
>>> what is the result of:
>>>
>>> # postmap -q postmastermydomain =ldap:/etc/postfix/local_recipients.cf
>> The result is postmaster.
>>
>>
>
> so postmasterexample.com is smtpd_sender_login_maps. it is probably
> blocked by your verify_login restriction class, for example because
> you have
>
> example.com verify_login
>
> in your /etc/postfix/my_domains.
>
> if you want postmasterexample.com to be able to send without
> authentication, you need to except it. for example by adding
> postmasterexample.com DUNNO
>
> if the above is not true, please show the contents of my_domain and
> block_senders.
>
>
>
>
Thanks for your reply.
All i want to do is to relay emails from users that are SASL authenticated.

 It is also desired to relay emails from users with the correct "from
address".
 
With the current configuration when a user tries to send an email using
a different username that he has used to login, he gets the error:

Failed to add recipient: testmydomain [SMTP: Invalid response code
received from server (code: 553, response: 5.7.1 <test1mydomain>:
Sender address rejected: not owned by user test)]

The problem appears when a user has activated a forwarding mechanism to
a different mail server and forwarded messages are sent to my server.

I don't know if it is possible with postfix to:

1) Relay emails only from sasl authenticated users,
2) force the users to use their real username for sending emails,
3) accept forwarded messages from other mail servers.

Thanks for your support,

Alex