282666Re: Aliases on local submissions only
- Jan 3, 2012On 2012-01-03 04:33, Philip Prindeville wrote:
> On 1/2/12 7:08 AM, Jeroen Geilman wrote:God no, why would you do that ?
>> On 01/02/2012 02:00 AM, Philip Prindeville wrote:
>>> I have a 'border' postfix MTA that doesn't host any mailboxes, indeed it doesn't even know what the valid usernames are for the domain.
>>> It merely serves to check messages for viruses, and block DoS attacks.
>>> As such, I need it to perform aliasing *only* on messages generated locally by system services, such as 'cron'.
>>> How do I configure that? I.e. that if a message is submitted locally by a service such as 'cron' or 'logwatch', it should be aliased to an internal mailbox name on an Intranet server...
>> There are several approaches.
>> Local processes use sendmail(1) to submit mail.
>> This is partly outside the normal flow of SMTP mail, as diagrammed here:
>> The pickup(8) service allows you to specify a content_filter, which you
>> could use to inject this mail into a separate smtpd(8) listener with
>> different restrictions than the main port 25 listener, one of those
>> being to allow aliasing to external recipients.
>> You could also set receive_override_options on the pickup(8) service
>> directly, and disable them on the normal smtpd(8) listener.
> So I can have:
> echo "receive_override_options = no_address_mappings">> /etc/postfix/main.cf
man postconf, postconf -e "option = value"
>If both behave as documented, that would give you the desired result, yes.
> but then in master.cf have:
> pickup ...
> -o receive_override_options=
> is that correct?
- << Previous post in topic