Re: [EXIM] Sendmail Person seeks exim knowledge :-)

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Philip Hazel
Data:  
Para: Adam Bentley
CC: exim-users
Assunto: Re: [EXIM] Sendmail Person seeks exim knowledge :-)
On Wed, 13 Jan 1999, Adam Bentley wrote:

> What I need to know is the following


Hmm. Looks like a good "FAQ"-type list... but only a couple of them are
in the existing FAQ :-)

> 1. With my sendmail setup I have two files which I use to filter incoming
> email - spamcan.cf (regexps to trap) and spamcan-exceptions.cf (things to
> pass regardless). Will exim allow me to create a file of regexps and match
> incoming external email to the list of regexps - and if a match is found
> file the offending message into a special location? Also is it possible to
> make exim only filter parts of an incoming email - ie. ignore large mime
> attachments for example and only process text/plain...


I assume the regexs are matching against the message content (headers +
body) rather than the incoming address? If so, then you can do some of
this in a system filter. The regexs, incidentally, are compatible with
Perl 5.005 (if you upgrade to Exim 2.10). You can say things like

  if $message_body matches <...some complicated regex...> or
     $message_body matches <...some other regex...> or
     $header_from: matches <...regex...> or 
     etc. 
  then
    save /some/special/file
  endif


(or instead of "save" you could have "deliver" (to some address) or
"pipe" (to some script)).

There isn't any mechanism for ignoring attachments, but $message_body
only looks at the first n bytes of the body, where n defaults to 500 but
can be changed.

> 2. I've hacked sendmail to make an ioctl call during a delivery after the
> rcpt to: has been done to check if a user has exceeded their email quota.
> If they have I issue a temporary failure and a message - can I do this
> with exim?


That isn't something I've heard of before. Exim can recognize quota
excession as a specific error, and you can set up special retry rules
for it (what we use is "if mailbox not read for 7 days, bounce
immediately, otherwise try every hour for one day, then bounce"). Using
something like this, mail that is delayed for your users for quota
reasons sits on your local server, not on somebody else's, and you
control when to give up.

However, I think you could do what you want by arranging for a quota
check to happen during the verification of the address after RCPT TO,
but without hacking Exim you would have to use the embedded Perl
facility to get it to run a Perl script to do the test.

> 3. Does exim support DSN (delivery status notification).


>From the FAQ:


A0517: Exim does not support any kind of delivery notification.         


       (1) You can configure it to recognize headers such as           
       "Return-receipt-to:" if you wish.


       (2) Some people want MSN (message status notification). Such services
       are implemented in MUAs, and don't impact on the MTA at all.


       (3) I investigated the RFCs which describe the DSN (delivery status
       notification) system, and there is even a bit of code in there (excluded
       by #ifdef) for handling some of the data. However, I was unable to
       specify any sensible way of actually doing anything with the data. There
       were comments on the mailing list at the time; many people, including
       me, conclude that DSN is in practice unworkable. The killer problem is
       with forwarding and aliasing. Do you propagate the DSN data with the 
       generated addresses? Do you send back a "reached end of the DSN world"
       or "expanded" message? Do you do this differently for different kinds of
       aliasing/forwarding? For a user who has a .forward file with a single
       address in, this might seem easy - just propagate the data. But what if 
       there are several forwardings? If you propagate the DSN data, the sender
       may get back several DSN messages - and should the sender really know
       about the detail of the receiver's forwarding arrangements? There isn't
       really any way to distinguish between a .forward file that is forwarding
       and one that is a mini mailing list. And so on, and so on. There are so
       many questions that don't have obvious answers.                      


> 4. We have a large password file and so I've modified sendmail to use
> alternatives to getpwnam - I call a routine called xgetpwnam which looks
> in a Berkelely DB file for the password info and extracts it from that -
> only if the call fails to xgetpwnam do I call getpwnam and open and trawl
> our rather large password/shadow files..... can exim use alternative
> lookups during delivery to speed things up.?


Yes. You don't have to use a passwd file at all. See sample
configuration C009 for some suggestions. (It shows lsearch lookups, but
these could equally be DBM or cbd or NIS or LDAP lookups.)

> 5. I assume I can use my existing alias files and forward files as well as
> procmail and effectively drop in exim in place of sendmail ?


Yes, as long as your alias/forward files don't assume that pipes are
going to run under a shell. If the do, you either have to change them,
or configure Exim to use a shell (which it doesn't by default).

> 6. I have lots of majordomo lists set-up in the alias file. I take it
> these will integrate fairly easily into the exim world?


Lots of people are using Majordomo with Exim. There's a web page
covering this at

         http://www.netmaster.ca/exim/majordomo.html    


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***