Skip to main content
Mixing proper MTA with Fetchmail
Source Link
tripleee
  • 8k
  • 2
  • 37
  • 45

This seems rather confused. Procmail does not run as a daemon, it is invoked as the delivery agent by Fetchmail, Sendmail etc if you configured them so. The whole story about why you think need Fetchmail seems wrong, though. But the short answer to what seems to finally be your question is, just use it exactly like you expected. If it's for this single purpose, you could even configure it to run your PHP script instead of Procmail (though I doubt your PHP script is going to be robust in the face of failures, so wrapping it in Procmail is probably a good idea anyway).

I'm not very familiar with Fechmail, but IIRC you configure it to use Procmail with something like

mda "procmail /home/you/.procmailrc" 

maybe you want a -d option or some other decorations, too.

Which mail server you are running is generally quite uninteresting, they all have vaguely similar mechanisms for dispatching Procmail (or another LDA) when a message is to be delivered locally. You might want to configure it to bypass the default system-wide /etc/procmailrc if the regular MTA flow should be separate from the Fetchmail one, but in your scenario, it sounds like you don't need to run Procmail from Sendmail at all, so you could keep it really simple.

This seems rather confused. Procmail does not run as a daemon, it is invoked as the delivery agent by Fetchmail, Sendmail etc if you configured them so. The whole story about why you think need Fetchmail seems wrong, though. But the short answer to what seems to finally be your question is, just use it exactly like you expected. If it's for this single purpose, you could even configure it to run your PHP script instead of Procmail (though I doubt your PHP script is going to be robust in the face of failures, so wrapping it in Procmail is probably a good idea anyway).

I'm not very familiar with Fechmail, but IIRC you configure it to use Procmail with something like

mda "procmail /home/you/.procmailrc" 

maybe you want a -d option or some other decorations, too.

This seems rather confused. Procmail does not run as a daemon, it is invoked as the delivery agent by Fetchmail, Sendmail etc if you configured them so. The whole story about why you think need Fetchmail seems wrong, though. But the short answer to what seems to finally be your question is, just use it exactly like you expected. If it's for this single purpose, you could even configure it to run your PHP script instead of Procmail (though I doubt your PHP script is going to be robust in the face of failures, so wrapping it in Procmail is probably a good idea anyway).

I'm not very familiar with Fechmail, but IIRC you configure it to use Procmail with something like

mda "procmail /home/you/.procmailrc" 

maybe you want a -d option or some other decorations, too.

Which mail server you are running is generally quite uninteresting, they all have vaguely similar mechanisms for dispatching Procmail (or another LDA) when a message is to be delivered locally. You might want to configure it to bypass the default system-wide /etc/procmailrc if the regular MTA flow should be separate from the Fetchmail one, but in your scenario, it sounds like you don't need to run Procmail from Sendmail at all, so you could keep it really simple.

Source Link
tripleee
  • 8k
  • 2
  • 37
  • 45

This seems rather confused. Procmail does not run as a daemon, it is invoked as the delivery agent by Fetchmail, Sendmail etc if you configured them so. The whole story about why you think need Fetchmail seems wrong, though. But the short answer to what seems to finally be your question is, just use it exactly like you expected. If it's for this single purpose, you could even configure it to run your PHP script instead of Procmail (though I doubt your PHP script is going to be robust in the face of failures, so wrapping it in Procmail is probably a good idea anyway).

I'm not very familiar with Fechmail, but IIRC you configure it to use Procmail with something like

mda "procmail /home/you/.procmailrc" 

maybe you want a -d option or some other decorations, too.