Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I couldn't seem to tell from the fetchmail man page or http://www.catb.org/~esr/fetchmail/fetchmail-man.html#7 whether --bsmtp <filename>.bsmtp.log, applied from cli/cronjob, and --mda <command> applied from varying fetchmailrc config files are mutually exclusive.

I am hoping not as I am trying to keep a "filename.bsmtp.log" for failover purposes on dedicated machine-email accounts, among all other fetchmail parameters to limit which messages are retrieved and how/if they are left on the IMAP server. Most of the messages the mda simply tosses so it is hard to tell if they've been seen or not properly by the mda. It is custom built and designed to exit immediately with no reading** under certain conditions, for example in the presence of certain other processes on the appliance.

If they are mutually exclusive, is there another way to log everything similar to --bsmtp, in fetchmail, without altering the custom built mda?

**Deliberately putting the responsibility back on fetchmail to not dismiss that message as read. Experimentally confirmed when the mda's stdin was not read until EOF before exiting

share|improve this question
    
An alternative to fetchmail as a layer would be fine too –  Marcos May 9 '12 at 11:30
    
Can you insert another MDA between fetchmail and the real MDA (a simple thing with tee)? –  Gilles May 9 '12 at 23:37
    
I considered that too, making a simple wrapper that logs before handing off/exec to the real MDA. The trouble is that mucks with the stdout of fetchmail, which sometimes I count on leaving unread partially or at all (the fetchmail side of the pipe sees where the seek pointer left off...) –  Marcos May 10 '12 at 7:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.