diff -urN /etc/exim4/conf.d.orig/acl/30_exim4-config_check_rcpt /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt --- /etc/exim4/conf.d.orig/acl/30_exim4-config_check_rcpt 2005-05-27 08:59:26.000000000 +0100 +++ /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt 2006-01-28 22:37:50.000000000 +0000 @@ -186,7 +186,22 @@ .include CHECK_RCPT_LOCAL_ACL_FILE .endif + # authed users are trusted, ok them before greylisting + accept + authenticated = * + # greylist people on dnsbl's + defer + dnslists = \ + dnsbl.sorbs.net : \ + sbl-xbl.spamhaus.org : \ + dsn.rfc-ignorant.org : \ + postmaster.rfc-ignorant.org : \ + abuse.rfc-ignorant.org : \ + whois.rfc-ignorant.org : \ + bogusmx.rfc-ignorant.org + acl = acl_greylist + # Accept if the address is in a local domain, but only if the recipient can # be verified. Otherwise deny. The "endpass" line is the border between # passing on to the next ACL statement (if tests above it fail) or denying diff -urN /etc/exim4/conf.d.orig/acl/40_exim4-config_check_data /etc/exim4/conf.d/acl/40_exim4-config_check_data --- /etc/exim4/conf.d.orig/acl/40_exim4-config_check_data 2005-05-27 08:59:26.000000000 +0100 +++ /etc/exim4/conf.d/acl/40_exim4-config_check_data 2005-10-28 14:36:41.000000000 +0100 @@ -33,6 +33,7 @@ .include CHECK_DATA_LOCAL_ACL_FILE .endif + accept acl = acl_scan # accept otherwise accept diff -urN /etc/exim4/conf.d.orig/acl/greylist /etc/exim4/conf.d/acl/greylist --- /etc/exim4/conf.d.orig/acl/greylist 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/acl/greylist 2006-01-18 11:49:54.000000000 +0000 @@ -0,0 +1,8 @@ +acl_greylist: + warn + set acl_m1 = ${lookup pgsql{GREYLIST}{$value}{unknown}} + + defer + condition = ${if eq{$acl_m1}{t}{true}} + log_message = greylisted + message = Please try later diff -urN /etc/exim4/conf.d.orig/acl/scan /etc/exim4/conf.d/acl/scan --- /etc/exim4/conf.d.orig/acl/scan 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/acl/scan 2006-01-28 14:35:20.000000000 +0000 @@ -0,0 +1,55 @@ +acl_scan: + # Reject virus infested messages. + deny message = This message contains malware ($malware_name) + malware = * + + # just accest localhost and hosts we relay for + accept hosts = 127.0.0.1:+relay_from_hosts + + accept condition = ${if eq { ${hmac{md5}{cbe25fe51aab2f0e}\ + {$body_linecount}}}{$h_X-Scan-Signature:} {1}{0}} + + #This is some sample output: + #X-Scanner: Exiscan on kunzite.stewarts.org.uk at 2005-10-27 16:19:19 + #X-Virus-Scanned: clamav + #X-Virus-Flag: No + #X-Spam-Score: 1.6 + #X-Spam-Bars: + + #X-Spam-Report: No, hits=1.6 required=5.0 tests=MISSING_DATE=0.019, MISSING_SUBJECT=1.57 with SpamAssassin 3.0.3 (2005-04-27) on kunzite.stewarts.org.uk + #(X-Spam-Flag: Yes) + #X-Scan-Signature: 3cfe4bbd95bbc3663f54609c2cdad123 + + # Add X-Scanner every time + warn message = X-Scanner: Exiscan on $primary_hostname at $tod_log + + # Add X-Virus-Scanned every time + warn message = X-Virus-Scanned: clamav + + # Add X-Virus-Flag :-) + warn message = X-Virus-Flag: No + + # Add Spam Score every time + warn message = X-Spam-Score: $spam_score + spam = nobody:true + + # Add Spam Bars every time + warn message = X-Spam-Bars: $spam_bar + spam = nobody:true + + # Add Report every time + warn message = X-Spam-Report: $spam_report + spam = nobody:true + + # Add Spam flag if it is spam + warn message = X-Spam-Flag: YES + spam = nobody + + # Reject spam messages with score over 10 + deny message = This message scored $spam_score points. + condition = ${if >{$spam_score_int}{100}{1}{0}} + spam = nobody:true + + warn message = X-Scan-Signature: ${hmac{md5}{cbe25fe51aab2f0e}\ + {$body_linecount}} + +accept diff -urN /etc/exim4/conf.d.orig/auth/postgres /etc/exim4/conf.d/auth/postgres --- /etc/exim4/conf.d.orig/auth/postgres 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/auth/postgres 2006-01-28 22:32:04.000000000 +0000 @@ -0,0 +1,9 @@ +virtual_auth_server_plain: + driver = plaintext + public_name = PLAIN + server_advertise_condition = ${if eq{$tls_cipher}{}{no}{yes}} + #$2 is the user, $3 is the password + server_condition = ${if crypteq{$3} \ + {${lookup pgsql {SELECT password FROM exim WHERE email = '${quote_pgsql:$2}'}}} \ + {yes}{no}} + server_set_id = $2 diff -urN /etc/exim4/conf.d.orig/main/00_localmacros /etc/exim4/conf.d/main/00_localmacros --- /etc/exim4/conf.d.orig/main/00_localmacros 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/main/00_localmacros 2006-01-28 14:53:02.000000000 +0000 @@ -0,0 +1 @@ +MAIN_TLS_ENABLE = yes diff -urN /etc/exim4/conf.d.orig/main/01_exim4-config_listmacrosdefs /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs --- /etc/exim4/conf.d.orig/main/01_exim4-config_listmacrosdefs 2005-05-27 08:59:27.000000000 +0100 +++ /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs 2006-01-28 15:04:58.000000000 +0000 @@ -47,7 +47,7 @@ .ifndef MAIN_LOCAL_DOMAINS MAIN_LOCAL_DOMAINS = DEBCONFlocal_domainsDEBCONF .endif -domainlist local_domains = MAIN_LOCAL_DOMAINS +domainlist local_domains = MAIN_LOCAL_DOMAINS : +virtual_domains .ifndef MAIN_RELAY_TO_DOMAINS MAIN_RELAY_TO_DOMAINS = DEBCONFrelay_domainsDEBCONF diff -urN /etc/exim4/conf.d.orig/main/greylist /etc/exim4/conf.d/main/greylist --- /etc/exim4/conf.d.orig/main/greylist 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/main/greylist 2006-01-18 11:40:08.000000000 +0000 @@ -0,0 +1,2 @@ +GREYLIST = SELECT greylist('${quote_pgsql:$sender_host_address}', '${quote_pgsql:$sender_address}', '${quote_pgsql:$local_part@$domain}') + diff -urN /etc/exim4/conf.d.orig/main/postgresql /etc/exim4/conf.d/main/postgresql --- /etc/exim4/conf.d.orig/main/postgresql 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/main/postgresql 2006-01-28 17:19:09.000000000 +0000 @@ -0,0 +1 @@ +hide pgsql_servers = (/var/run/postgresql/.s.PGSQL.5432)/mail/mail/ diff -urN /etc/exim4/conf.d.orig/main/scan /etc/exim4/conf.d/main/scan --- /etc/exim4/conf.d.orig/main/scan 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/main/scan 2006-01-18 11:19:11.000000000 +0000 @@ -0,0 +1 @@ +av_scanner = clamd:/var/run/clamav/clamd.ctl diff -urN /etc/exim4/conf.d.orig/main/virtual /etc/exim4/conf.d/main/virtual --- /etc/exim4/conf.d.orig/main/virtual 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/main/virtual 2006-01-28 17:53:32.000000000 +0000 @@ -0,0 +1,6 @@ +localpartlist virtual_localparts_ignore = postmaster : abuse + +domainlist virtual_domains = \ + ${lookup pgsql {SELECT DISTINCT domain FROM account WHERE domain = '${quote_pgsql:$domain}'}} \ + : ${lookup pgsql {SELECT DISTINCT domain FROM alias WHERE domain = '${quote_pgsql:$domain}'}} + diff -urN /etc/exim4/conf.d.orig/router/345_virtual_alias /etc/exim4/conf.d/router/345_virtual_alias --- /etc/exim4/conf.d.orig/router/345_virtual_alias 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/router/345_virtual_alias 2006-01-28 17:45:28.000000000 +0000 @@ -0,0 +1,20 @@ +virtual_alias: + debug_print = "R: virtual_alias for $local_part@$domain" + + local_parts = ! +virtual_localparts_ignore + domains = +virtual_domains + + driver = redirect + data = ${lookup pgsql {SELECT target FROM alias WHERE "name" = '${quote_pgsql:$local_part}' AND domain = '${quote_pgsql:$domain}'}} + + forbid_file + forbid_filter_existstest + forbid_filter_logwrite + forbid_filter_lookup + forbid_filter_perl + forbid_filter_readfile + forbid_filter_readsocket + forbid_filter_reply + forbid_filter_run + forbid_include + forbid_pipe diff -urN /etc/exim4/conf.d.orig/router/350_virtual_account /etc/exim4/conf.d/router/350_virtual_account --- /etc/exim4/conf.d.orig/router/350_virtual_account 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/router/350_virtual_account 2006-01-28 17:54:29.000000000 +0000 @@ -0,0 +1,20 @@ +virtual_account: + debug_print = "R: virtual_account for $local_part@$domain" + + local_parts = ! +virtual_localparts_ignore + domains = +virtual_domains + + driver = redirect + data = ${lookup pgsql \ + {SELECT DISTINCT '/var/mail/' || domain || '/' || "name" || '/' \ + FROM account \ + WHERE "name" = '${quote_pgsql:$local_part}' \ + AND domain = '${quote_pgsql:$domain}'}} + + user = mail + group = mail + + directory_transport = virtual_delivery + + cannot_route_message = "Unknown user $local_part@$domain" + diff -urN /etc/exim4/conf.d.orig/router/355_virtual_default /etc/exim4/conf.d/router/355_virtual_default --- /etc/exim4/conf.d.orig/router/355_virtual_default 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/router/355_virtual_default 2006-01-28 15:42:56.000000000 +0000 @@ -0,0 +1,22 @@ +virtual_default: + debug_print = "R: virtual_default for $local_part@$domain" + + local_parts = ! +virtual_localparts_ignore + domains = +virtual_domains + + driver = redirect + data = ${lookup pgsql {SELECT target FROM alias WHERE "name" = '*' AND domain = '${quote_pgsql:$domain}'}} + more = false + + forbid_file + forbid_filter_existstest + forbid_filter_logwrite + forbid_filter_lookup + forbid_filter_perl + forbid_filter_readfile + forbid_filter_readsocket + forbid_filter_reply + forbid_filter_run + forbid_include + forbid_pipe + diff -urN /etc/exim4/conf.d.orig/transport/virtual_delivery /etc/exim4/conf.d/transport/virtual_delivery --- /etc/exim4/conf.d.orig/transport/virtual_delivery 1970-01-01 01:00:00.000000000 +0100 +++ /etc/exim4/conf.d/transport/virtual_delivery 2006-01-28 17:56:02.000000000 +0000 @@ -0,0 +1,25 @@ +virtual_delivery: + debug_print = "T: virtual_delivery for $local_part@$domain" + driver = appendfile + envelope_to_add = true + return_path_add = true + check_string = "" + escape_string = "" + maildir_format + quota = ${lookup pgsql {SELECT quota * 1024 * 1024 FROM account WHERE "name" = '${quote_pgsql:$local_part}' AND domain = '${quote_pgsql:$domain}'}} + quota_warn_threshold = 80% + maildir_use_size_file = true + quota_warn_message = "\ +To: $local_part@$domain\n\ +From: postmaster@wang.choosehosting.com\n\ +Subject: Mailbox quota\n\ +\n\ +This message is automatically created by mail delivery software.\n\ +\n\ +Your mailbox has reached 80% of its capacity. If you do not free\n\ +up some space by deleting old mail, you will not receive any new\n\ +mail that may be sent to you.\n\ +\n\ +Regards,\n\ +postmaster" +