procmail
[Top] [All Lists]

RE: procmail and virtual mail accounts

2007-03-01 11:40:17


-----Original Message-----
From: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE]On Behalf Of 
Professional
Software Engineering
Sent: Wednesday, February 28, 2007 11:20 PM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: procmail and virtual mail accounts


At 21:58 2007-02-28 -0500, Giff Hammar wrote:
I'm sorry if this is a duplicate, but I didn't see the original post.

I have a web site at a hosting service and have set up several mail
addresses. I want to be able to send an e-mail to a specific address in my
domain and have procmail process the mail.

You need to arrange with the hosting service to set up aliasing to pipe
messages to procmail.  If they're usually only associated with POP or IMAP
mailboxes, and not a LOCAL account, procmail won't be invoked for them even
if it is the local delivery agent (LDA).

- That is correct - these are POP accounts.

I have tried putting the .procmailrc file at several different levels in
the
directory structure (/home/domain, /home/domain/mail,
/home/domain/mail/domain.com, /home/domain/mail/domain.com/user), but the
mail always gets delivered to the user inbox. This leads me to believe that
procmail is not being called for the virtual user name since it doesn't
really exist on the server, at least in the Unix sense.

Are you doing this via FTP, or can you SHELL (SSH or Telnet) into the box?

- I have SSH access, so I can log into the system, but even then, I would
not have root access.

Has anyone set up this kind of system before?

Can't say that I have -- I use real servers with real accounts <g>

- Me too, but I don't have that option at present.

My recipe is pretty simple (the names have been changed to protect the
innocent):

:0
* ^TOuser(_at_)domain(_dot_)com
| ./script_to_run-v1.pl

Uhm, if the script is SUPPOSED to be user specific to start with, then
arguably you could just ask that the perl script be set up as an alias
target in the system.  Again, call your hosting provider and ask.

In sendmail terms:

[in virtusertable.txt file]
someuser(_at_)yourdomain(_dot_)tld         somespecialalias

[in aliases file]
somespecialalias:               |/path/to/script/script_to_run-v1.pl

If the system is fully virtualized - that is, YOU have a separate /etc/mail
config from all the other domains (which from connecting to your SMTP, I'd
say IS NOT the case), then you could alias directly to the one true
username - otherwise, entries in the aliases file are usernames across ALL
hosted domains on that box if not otherwise handled in the virtusertable.

- I think you're right that I don't have a fully virtualized system.

The problem with the above setup is that the script is invoked with
elevated privledges (whatever the MTA is running as), so the admin must set
things up so that it is invoked as the user - say using:

                 |su - spanky -c /path/to/script/script_to_run-v1.pl

(some tweakage to /etc/suauth might be appropriate)

"hostmonster.com" however doesn't appear to be using sendmail.  They're
using exim:

220-host16.hostmonster.com ESMTP Exim 4.63 #1 Wed, 28 Feb 2007
21:04:15 -0700
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.

- I'd say that is correct, but I think that we can set up the initial
procmail redirect in much the same way in exim or sendmail.


---
  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 homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail




____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>