Re: [Exim] SMTP Push

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Nigel Metheringham
Ημερομηνία:  
Προς: Andrew Chant
Υ/ο: ph10, exim-users
Αντικείμενο: Re: [Exim] SMTP Push
andy@??? said:
> This all sounds so easy, but there is a slight flaw in the plan. The
> messages will need to be accessed by other software, so they will need
> to be stored in the maildir format.


In that case make sure that exim is writing the Return-Path: and
Envelope-To: headers, then write a small perl script which:-

- connects to the SMTP or BSMTP server - ie open "|/usr/sbin/exim -bS"
- opens the maildir file
- reads the first couple of lines (ie envelope-to & return-path)
- writes "MAIL FROM <contents of return-path>"
- writes "RCPT TO <contents of envelope-to>"
- writes "DATA"
- shoves message data down pipe
- finishes up

You probably want a couple of wrinkles - most of that should be in a
per file loop, and you want to check for lines starting with "." and
double them.

    Nigel.
-- 
[ Nigel Metheringham           Nigel.Metheringham@??? ]
[ Phone: +44 1423 850000                         Fax +44 1423 858866 ]
[ - Comments in this message are my own and not ITO opinion/policy - ]