Istvan Prosinger:
> >> Why a separate header, why not just:
> >>
> >> enable_long_queue_ids = yes
> >>
> >> and use the queue ID that's already in your top Received: header?
> >
> > I would use a header_checks PREPEND action that prepends a header
> > with the long queue ID from the Received: header.
> >
> > Sorry, no time to write out a complete example.
> 
> Thanks.
> 
> Ok, I was thinking of this, but wasn't sure how to "pass" the (long or 
> not) queue ID (or anything else) in header_checks. Another thought is to 
> copy one that is already there, but not sure how to do it or how far can 
> I go in a "one-liner".
/etc/postfix/main.cf:
    enable_long_queue_ids = yes
    header_checks = /etc/postfix/stamp.pcre

/etc/postfix/stamp.pcre:
    # Pattern for /usr/sbin/sendmail submission
    /^Received:\sby\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend 
X-ID $1.server.example.com

    # Pattern for SMTP submission
    
/^Received:\sfrom\s\S+\.example\.com\s\S+\s\S+\s+by\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/
 Prepend X-ID $1.server.example.com

        Wietse

Reply via email to