On Wed, Jun 17, 2009 at 03:26:41PM +0200, David wrote: > Okay, this is kind of a weird question, but it came up at work. > > I'm a complete exim newbie (I've never configured it before, beyond > 'dpkg-reconfigure exim4-config'), but a project came up where the > manager wants to use exim in a weird way. Basically, this needs to > happen: > > 1) Exim receives a mail, from a trusted IP address > > 2) If the mail is to a non-existant user account, then create the > system account, deliver the mail to the new account's mail file
Since this mail is coming from a trusted server, why not have a script on that server first check (via ssh) if the user exists? Or, have it send the mail blindly. If the user doesn't exist, exim bounces it back. the sending script then uses ssh to create the user on the target system. > 3) And always, after delivering a mail (for new or existing users): > Call an external script, so that our custom logic can see the new > mails immediately after they appear, and do some further handling. Are you sure that email is the best route at all for this traffic? Mail to non-existant user so that a script on a remote box can read the mail? Why not just rsync (or scp) over ssh a file containing the information? Or, have programmes at each end running with a socket between them? Or use have the target script put the output to stdout, pipe it through ssh to the receiving script taking it from stdin via a pipe from ssh? Doug. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org