Re: [exim] Condition problem.

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: W B Hacker
Dátum:  
Címzett: exim users
Tárgy: Re: [exim] Condition problem.
Max Lock wrote:
> http://www.datanet.co.uk/default.aspx http://www.datanet.co.uk/default.aspx
>
> --------------------------------------------------------------------------
> Hi Folks,
>
> Thanks for the pointers so far. I'll try and answer your questions, as
> you may have guessed I'm new to Exim.
>
> W B Hacker <wbh@???>
>> Aside from wanting to do it the hardest way possible [1], are you
>> also asking a boolean result of a boolean field (I can only guess what
>> your field types are..) then also wanting to compare it (again) when
>> not required? [2]
>
> Bill, The general idea is that I'm doing spam checking for specific


*snip*

ACK. Been doing it 'per user' since Exim 4.43 was brand-new.

pg_quarantine is the boolean switch here.

But we pull the user's pref at acl_smtp_rcpt time, carry it thereafter
in an acl_c => acl_m

Rather than blackhole, we can 'deny' while still in-session. That logic
doesn't relate to what you are working on, but it reduces need of
out-of-band DSN's

Some portion of this might help - it is the transport called by that
router snippet I sent earlier:

=====
# TRANSPORT_7 LOCAL DB: db_quarantine_delivery.
#
db_quarantine_delivery:
   driver = appendfile
   user = exim
   group = mail
   delivery_date_add = true
   envelope_to_add = true
   return_path_add = true
   maildir_format = true
   mode = 0770
   directory =  /${lookup pgsql{SELECT pg_mailroot FROM mailprof \
         WHERE pg_local_part='${local_part}' \
         AND pg_domain='${domain}' LIMIT 1}}/\
         ${lookup pgsql{SELECT pg_login_name FROM mailprof \
         WHERE pg_local_part='${local_part}' AND pg_domain='${domain}' \
         LIMIT 1}}/\
         ${lookup pgsql{SELECT pg_maildir FROM mailprof \
         WHERE pg_local_part='${local_part}' AND pg_domain='${domain}' \
         LIMIT 1}}/.Suspect\


create_directory = true
directory_mode = 0770
headers_remove = <long list redacted>

======

NOTES:

The empty line just above 'create_directory...' is *essential*

ALL fieldnames begin with 'pg_' so I can otherwise use the same names as
Exim variables, yet tell which is which.

Oddities:

pg_login_name: we don't use email addresses as logins.

directory = and ..pg_maildir .. mailstore location is partly stored in
the DB, partly 'built' from the usual players.

Yours is probably much simpler, I only show this because of the last
line it leads to:

'.../.Suspect\

That's an Exim-created/re-created IMAP folder.

Done that way as *users tend to delete the entire folder*, not just the
spam in it.

No sweat - Exim just makes a new one next go, and the MUA's are set to
tell Dovecot to show ALL folders, not just those 'subscribed'.

HTH,

Bill