RE: [Exim] vacation notices and mailing lists/groups

Góra strony
Delete this message
Reply to this message
Autor: Brian K. West
Data:  
Dla: 'Thomas Poepl', exim-users
Temat: RE: [Exim] vacation notices and mailing lists/groups
Here is a very creative way of doing this:

MYSQL_AUTOREPLY                = SELECT DISTINCT CONCAT('#Exim
filter\nif personal\nthen\n mail\n\tto \$reply_address\n\tfrom
',local_part,'@',domain, '\n\tsubject "Autoreply (\$h_subject:)"\n\ttext
\"',REPLACE(replymsg,'\\n','\\\\n'),'\"\n\tonce
/export/home/',domain,'/mail/autoreply-$local_part@$domain\n\tonce_repeat
10d\nendif') as autoreply FROM accounts WHERE
MYSQL_USERNAMEFIELD='${quote_mysql:$local_part}' AND
MYSQL_DOMAINFIELD='${quote_mysql:$domain}' AND MYSQL_ISAUTOREPLYFIELD='Y';


virtual_autoreply:
  driver                 = redirect
  allow_filter
  allow_defer
  allow_fail
  check_local_user             = false
  data                    = ${lookup mysql{MYSQL_AUTOREPLY}}
  no_verify
  no_expn
  check_ancestor
  reply_transport            = address_reply
  user                    = ${lookup mysql {MYSQL_UID}}
  group                    = ${lookup mysql {MYSQL_GID}}



Thanks,
bkw

-----Original Message-----
From: exim-users-admin@??? [mailto:exim-users-admin@exim.org] On Behalf
Of Thomas Poepl
Sent: Monday, May 26, 2003 4:17 AM
To: exim-users@???
Subject: [Exim] vacation notices and mailing lists/groups

Hello,

I wan't to use vacation messages with my Exim built (4.12). I've set up
a router that looks for a "vacation.msg" file. This works fine. But I
don't wan't my router to sent vacation replies to mailing lists or
mailing groups. So I tried to "add_headers" like "precedence: list"
within my routers. I have to routers, one does lookup the mailing
groups, it is a redirect router and I'm adding the headers within this
router. The other is my vacation-reply router, it does look for the
header my mailing-group router adds to the message. Now the Problem I
have:
If I set a vacation message the headers won't get added to my message.
But If I don't set up a vacation message the headers get changed.
These are my routers:

group_aliases:
  driver = redirect
  headers_add = Precedence: list\n\
                Recent-From: $original_local_part@$domain\n
  data = ${lookup ldapm \
                {user="uid=exim,ou=exim,dc=capcom,dc=de" pass=xxxxxxx \
                ldap:///dc=$domain,ou=exim,dc=capcom,dc=de\
                ?rfc822MailMember?sub?(&(objectClass=nisMailAlias)\
                (cn=$local_part))}{$value} fail }



uservacation:
  driver = accept
  domains = +local_domains
  #do not reply to errors or lists
  condition = "${if or {{match {$h_precedence:} {(?i)junk|bulk|list}}
{eq {$sender_address} {}}} {no} {yes}}"
  no_expn
  require_files = /ccmail/var/vacations/\
                  $local_part/.vacation.msg
  #do not reply to errors and bounces or lists
  senders = " ! ^.*-request@.*:\
              ! ^owner-.*@.*:\
              ! ^postmaster@.*:\
              ! ^listmaster@.*:\
              ! ^mailer-daemon@.*\
              ! ^root@.*"
  transport = uservacation_transport
  unseen
  no_verify


I would be thankfull isf somebody could help me with this.

TIA

Thomas Poepl


--
+---------------------------------------------------------------------+
| Thomas Poepl           | Tel: +49-6151/155-903                      |
| CAPCom AG              | Fax: +49-6151/155-909                      |
| Rundeturmstrasse 12    | http://www.capcom.de                       |
| D-64283 Darmstadt      | mailto:Thomas.Poepl@capcom.de              |

+---------------------------------------------------------------------+




--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##