milter-null address incomplete error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

milter-null address incomplete error

Sam Nilsson
Hi,

I am testing milter-null with postfix and it seems to work for the most
part, but I have run into one specific situation where messages are
rejected by milter-null due to an incomplete sender address. Here is the
relevant part of my maillog:

May 19 17:15:37 dev postfix/pickup[81800]: 80A7250821: uid=0 from=<root>
May 19 17:15:37 dev milter-null[81743]: 00001 NOQUEUE: host localhost
[127.0.0.1] OK
May 19 17:15:37 dev postfix/cleanup[81835]: 80A7250821: milter-reject:
MAIL from localhost[127.0.0.1]: 5.1.7 ad
dress incomplete; from=<[hidden email]>

When submitting mail locally from the command line using the "mail"
binary or postfix's sendmail binary, the default sender address is
simply the username. Postfix rewrites that username by adding the
appropriate domain name, but it apparently does this after running the
message through milter-null.

The result is that I can't use milter-null with messages submitted via
the command line unless those messages explicitly use postfix's sendmail
binary and specify a complete sender address including the domain name.

I don't see any way to alter milter-null's behavior other than editing
the source. Is there any way to fix or change this behavior in postfix
to allow milter-null to work in this situation? What would be the best
approach to getting this working? My understanding is that postfix
cannot add on the domain name at any earlier stage. Is that correct?

I am using postfix 2.4.6,1 installed from ports on FreeBSD 6.2.

Thanks,
- Sam
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: milter-null address incomplete error

Victor Duchovni
On Tue, May 20, 2008 at 12:30:27PM -0700, Sam Nilsson wrote:

> Hi,
>
> I am testing milter-null with postfix and it seems to work for the most
> part, but I have run into one specific situation where messages are
> rejected by milter-null due to an incomplete sender address. Here is the
> relevant part of my maillog:
>
> May 19 17:15:37 dev postfix/pickup[81800]: 80A7250821: uid=0 from=<root>
> May 19 17:15:37 dev milter-null[81743]: 00001 NOQUEUE: host localhost
> [127.0.0.1] OK
> May 19 17:15:37 dev postfix/cleanup[81835]: 80A7250821: milter-reject:
> MAIL from localhost[127.0.0.1]: 5.1.7 ad
> dress incomplete; from=<[hidden email]>
>
> When submitting mail locally from the command line using the "mail"
> binary or postfix's sendmail binary, the default sender address is
> simply the username. Postfix rewrites that username by adding the
> appropriate domain name, but it apparently does this after running the
> message through milter-null.
>
> The result is that I can't use milter-null with messages submitted via
> the command line unless those messages explicitly use postfix's sendmail
> binary and specify a complete sender address including the domain name.
>
> I don't see any way to alter milter-null's behavior other than editing
> the source. Is there any way to fix or change this behavior in postfix
> to allow milter-null to work in this situation? What would be the best
> approach to getting this working? My understanding is that postfix
> cannot add on the domain name at any earlier stage. Is that correct?

Postfix gives milters the original envelope addresses received from
the network or during local submission.

Clearly this milter is not designed to handle non-SMTP mail.

I always use null-client Postfix instances for local mail submission,
these deliver the mail via SMTP to appropriate smarthost instances.
Even on the smarthost, local mail is sent from a trivial null-client
instance via SMTP to the smart-host SMTP routing engine which does not
process locally submitted mail.

If your needs are complex enough to deploy milters, perhaps you can
separate local submission and SMTP service into separate Postfix
instances (with care to avoid "mail loops back to myself" issues on
hosts whose null-client is talking to the SMTP engine on the same
system).

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[hidden email]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: milter-null address incomplete error

Wietse Venema
In reply to this post by Sam Nilsson
Sam Nilsson:
[ Charset ISO-8859-1 unsupported, converting... ]

> Hi,
>
> I am testing milter-null with postfix and it seems to work for the most
> part, but I have run into one specific situation where messages are
> rejected by milter-null due to an incomplete sender address. Here is the
> relevant part of my maillog:
>
> May 19 17:15:37 dev postfix/pickup[81800]: 80A7250821: uid=0 from=<root>
> May 19 17:15:37 dev milter-null[81743]: 00001 NOQUEUE: host localhost
> [127.0.0.1] OK
> May 19 17:15:37 dev postfix/cleanup[81835]: 80A7250821: milter-reject:
> MAIL from localhost[127.0.0.1]: 5.1.7 ad
> dress incomplete; from=<[hidden email]>
>
> When submitting mail locally from the command line using the "mail"
> binary or postfix's sendmail binary, the default sender address is
> simply the username. Postfix rewrites that username by adding the
> appropriate domain name, but it apparently does this after running the
> message through milter-null.
>
> The result is that I can't use milter-null with messages submitted via
> the command line unless those messages explicitly use postfix's sendmail
> binary and specify a complete sender address including the domain name.
>
> I don't see any way to alter milter-null's behavior other than editing
> the source. Is there any way to fix or change this behavior in postfix
> to allow milter-null to work in this situation? What would be the best
> approach to getting this working? My understanding is that postfix
> cannot add on the domain name at any earlier stage. Is that correct?

What about:

/etc/postfix/master.cf:
    pickup    fifo  n       -       n       60      1       pickup
        -o content_filter=smtp:127.0.0.1:25

This requires "postfix reload".

        Wietse
 
> I am using postfix 2.4.6,1 installed from ports on FreeBSD 6.2.
>
> Thanks,
> - Sam
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: milter-null address incomplete error

Sam Nilsson
In reply to this post by Victor Duchovni
Victor Duchovni wrote:

> Postfix gives milters the original envelope addresses received from
> the network or during local submission.
>
> Clearly this milter is not designed to handle non-SMTP mail.
>
> I always use null-client Postfix instances for local mail submission,
> these deliver the mail via SMTP to appropriate smarthost instances.
> Even on the smarthost, local mail is sent from a trivial null-client
> instance via SMTP to the smart-host SMTP routing engine which does not
> process locally submitted mail.

Hi Victor,

Thanks for the quick helpful reply. I hadn't thought of using an extra
postfix instance and that would clearly work. I would like to avoid that
just because of the extra complexity and administrative overhead, but I
am glad to have the option in case I don't find a better solution.

By the way, what do you mean by "null-client Postfix instance". Does
that just mean one that doesn't listen on smtp? Besides that specific
terminology, I understand the system that you are describing.

Thanks,
- Sam
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: milter-null address incomplete error

Sam Nilsson
In reply to this post by Wietse Venema
Wietse Venema wrote:
> What about:
>
> /etc/postfix/master.cf:
>     pickup    fifo  n       -       n       60      1       pickup
> -o content_filter=smtp:127.0.0.1:25
>
> This requires "postfix reload".

Hi Wietse,

Thanks for the excellent software, and thanks for this idea. I really
like this trick, but it didn't work for me. Maybe there is a workaround
or setting for the resulting error:

Diagnostic-Code: X-Postfix; mail for 127.0.0.1 loops back to myself

Thanks,
- Sam
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: milter-null address incomplete error

/dev/rob0
In reply to this post by Sam Nilsson
On Wed May 21 2008 17:21:40 Sam Nilsson wrote:
> By the way, what do you mean by "null-client Postfix instance". Does
> that just mean one that doesn't listen on smtp? Besides that specific

http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client
--
    Offlist mail to this address is discarded unless
    "/dev/rob0" or "not-spam" is in Subject: header
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: milter-null address incomplete error

Victor Duchovni
In reply to this post by Sam Nilsson
On Wed, May 21, 2008 at 03:24:05PM -0700, Sam Nilsson wrote:

> Wietse Venema wrote:
> >What about:
> >
> >/etc/postfix/master.cf:
> >    pickup    fifo  n       -       n       60      1       pickup
> > -o content_filter=smtp:127.0.0.1:25
> >
> >This requires "postfix reload".
>
> Hi Wietse,
>
> Thanks for the excellent software, and thanks for this idea. I really
> like this trick, but it didn't work for me. Maybe there is a workaround
> or setting for the resulting error:
>
> Diagnostic-Code: X-Postfix; mail for 127.0.0.1 loops back to myself

Yes, the simplest solution is to use a port other than 25 (and configure
an SMTP listener there).

I think multiple instances are simpler, especially because the null-client
instance is the same on all machines, including the smarthost. If you
only have one machine, that does not help of course, but the hoops you
have to jump through go away, the null client is simple, and the smarthost
is SMTP only.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[hidden email]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: milter-null address incomplete error

Sam Nilsson
Victor Duchovni wrote:

> On Wed, May 21, 2008 at 03:24:05PM -0700, Sam Nilsson wrote:
>
>> Wietse Venema wrote:
>>> What about:
>>>
>>> /etc/postfix/master.cf:
>>>    pickup    fifo  n       -       n       60      1       pickup
>>> -o content_filter=smtp:127.0.0.1:25
>>>
>>> This requires "postfix reload".
>> Hi Wietse,
>>
>> Thanks for the excellent software, and thanks for this idea. I really
>> like this trick, but it didn't work for me. Maybe there is a workaround
>> or setting for the resulting error:
>>
>> Diagnostic-Code: X-Postfix; mail for 127.0.0.1 loops back to myself
>
> Yes, the simplest solution is to use a port other than 25 (and configure
> an SMTP listener there).
>
> I think multiple instances are simpler, especially because the null-client
> instance is the same on all machines, including the smarthost. If you
> only have one machine, that does not help of course, but the hoops you
> have to jump through go away, the null client is simple, and the smarthost
> is SMTP only.
>

Adding a new listener on a different port solved that problem. Thanks so
much for the help.

- Sam
Loading...