How to use fetchmail with procmail (or maildrop) on a server running sendmail?
0
votes
1
answer
1244
views
I have *Amazon Linux* instances in *AWS EC2*. They run
sendmail
to communicate with each other, and send outgoing mail through a SMARTHOST that is a commercial email provider. No MX records are pointing to my EC2 instances' public IP addresses, and no incoming mail ports are open. What I really want is to have a commercial website (goformz.com) send a POST request with a PDF form to my website hosted on these instances
whenever a user submits a form. But until they figure out how to do that, I could work with their current behavior of having them email a PDF attachment to an address on the commercial email server.
After some head-scratching, it looks like I could probably get what I need by installing fetchmail
and either procmail
or maildrop
, no need to touch my sendmail
configuration. And that it "ought" to be very simple. I am familiar with **using** procmail
in a ~/.forward file as a **user**, but installing and configuring it on my EC2 servers is baffling to me after reading the documentation. It looks like both fetchmail
and procmail
want to run as daemons, and hand off messages to other servers. I expected that fetchmail
would run as a daemon, fetching messages from the commercial email account over IMAP at some frequency, and then **synchronously** invoke procmail
on each message, with a rule that was simply to pipe the message to a PHP script that would extract the attachment and process the form fields in it. It would be okay if the script invocation had to be in a ~/.forward file, I would hard-wire the user directory, but I don't see how to set that up. Can anyone set me straight on this, perhaps with just a pointer to documentation that would address this scenario?
I have found other answered questions that look similar, but none that have enlightened me. What I've found seems to assume that the server would be running postfix
as the MTA.
Asked by sootsnoot
(101 rep)
Oct 24, 2022, 04:28 PM
Last activity: Oct 27, 2022, 04:52 AM
Last activity: Oct 27, 2022, 04:52 AM