procmail
[Top] [All Lists]

Re: Is it possible?

2002-02-19 12:01:08
At 09:48 2002-02-19 -0500, Bill Sechrist did say:
Woops, fired a blank by mistake. =)

By my count, two of 'em.

My question is: Can procmail be made to just deliver the mail to a file with the whole email address as the filename, and without any consultation of the /etc/passwd file?

/etc/passwd would be referred to at some point to determine $HOME, among other things. Sendmail certainly refers to passwd several times.

When sendmail determines the message is for local delivery, I'm fairly certain that it'll need to know that there is a valid local recipient. I don't know that sendmail will do this before calling procmail with the local recipient name, or if sendmail relies solely on the local recipient from alias expansion. I would expect the former.

What I'm looking for is to have any mail that comes in for any domain I receive mail for to be written to a file in /var/spool/mail per the above rule. (I am taking the mail from there and putting it in a mysql database, and would like to be able to handle the functionality of sendmail's "virtusertable" myself, as well as avoid the need to have /etc/passwd or aliases entries for every user/address.)

Uh, you're going to have to configure sendmail to know that the delivery is local, at least by a wildcard for the domain in virtusertable.

What I think you REALLY want to do is simply use Sendmail to create a sql mailer type (see the basic config for Mprog and Mlocal in sendmail.cf), which defines a program that gets invoked on any message which resolves to be being delivered to the SQL mailer. That program can be passed arguments such as the envelope sender and recipient(s), then could pump it directly into your SQL database -- no interrim file necessary, and no loss of envelope information.

That however, would be a matter for a sendmail support forum, since what would arguably be the best solution for what you're trying to do would not involve procmail.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Is it possible?, Bill Sechrist
    • Re: Is it possible?, Professional Software Engineering <=