> Gary Smith:
> > Hi team,
> >
> > I may have asked this years ago, but I can't find it in my email.
> > I have a need to retrieve the queue_id of emails submitted at time of
> > submission when issuing submissions with the -G option.  I can see
> > that there is a queue_id on all of the output specified in -vv.  With
> > that I can grab all the output and extract queue_id, but I'm wondering
> > if there is a better or recommended way of doing this?
> 
> The Postfix sendmail+postdrop commands create a queue file in the
> maildrop directory. That is NOT the queue ID that Postfix will use during
> actual message deliveries.
> 
> If you need the queue ID that is used during message deliveries.
> then you need to submit mail with SMTP (preferably, using the "submission"
> port).
> 
>       Wietse

Wieste, 

Sorry for the slow follow up.  To make sure that I'm on the same page, 

Exiting:
master.cf:
smtp      inet  n       -       n       -       -       smtpd
        -o content_filter=jbaddrfix:dummy
jbaddrfix unix  -       n       n       -       10      pipe
  flags=Rq user=filter argv=/etc/postfix/custom/jb_mail_processor.py --from 
${sender} --recipient ${recipient}

main.cf:
virtual_alias_maps = hash:/etc/postfix/custom/virtual_alias

So for all incoming email I want to pass it off to the jb_mail_processor 
script.  This script internally breaks the email down into a list of unique 
emails based upon the --recipient map values passed in from smtp to jbaddrfix.

Inside of the script file we re-inject it back into the process via 
"/usr/sbin/sendmail -G -I -f @sender -- @recipient"

Instead of using the /usr/sbin/sendmail I should run it directly back into the 
submission/smtp as a new email?  If so, what's the best command to do that, and 
best way to log the queue id of that new email being submitted?

Sorry, not trying to be dense here, I've just always done it using sendmail and 
haven't needed tracking until now.



Reply via email to