Ik probeer op mijn postfix mailserver met mysql database maildrop in te bouwen voor het filteren van mail.
Huidige (werkende) situatie.
Debian Sqeeuze Linux Postfix mailserver met mysql database en momenteel een tiental virtuele mailboxen.Spamassassin en ClamAV worden aangeroepen door postfix. Spamassasin labelt de spam netjes met het label *** SPAM ***.
Een van de eerste dingen die ik maildrop wil laten doen is de met spam gelabelde mail in een aparte map zetten.
Echter ik krijg maildrop niet aan de praat. Na het proberen van diverse configuraties heb ik het nog steeds niet werkend. Het is voor mij zoeken naar de welbekende spel in een hooiberg. Al lijkt die hooiberg niet zo groot.
De foutmelding in syslog is de volgende:
Waarbij de user virtual de eigenaar is van alle mailboxen. In de documentatie staat de user vmail. Maar die heb ik niet in mijn configuratie.
Hieronder is mijn configuratie. Ik heb voor de zekerheid maar de gehele files neergezet, want wellicht laat ik een regel weg die wel degelijk van belang is.
Weet iemand wat de misconfiguratie is?
main.cf
master.cf
Huidige (werkende) situatie.
Debian Sqeeuze Linux Postfix mailserver met mysql database en momenteel een tiental virtuele mailboxen.Spamassassin en ClamAV worden aangeroepen door postfix. Spamassasin labelt de spam netjes met het label *** SPAM ***.
Een van de eerste dingen die ik maildrop wil laten doen is de met spam gelabelde mail in een aparte map zetten.
Echter ik krijg maildrop niet aan de praat. Na het proberen van diverse configuraties heb ik het nog steeds niet werkend. Het is voor mij zoeken naar de welbekende spel in een hooiberg. Al lijkt die hooiberg niet zo groot.
De foutmelding in syslog is de volgende:
code:
1
| Feb 5 13:45:34 tyr postfix/pipe[21842]: fatal: get_service_attr: unknown username: virtual |
Waarbij de user virtual de eigenaar is van alle mailboxen. In de documentatie staat de user vmail. Maar die heb ik niet in mijn configuratie.
Hieronder is mijn configuratie. Ik heb voor de zekerheid maar de gehele files neergezet, want wellicht laat ik een regel weg die wel degelijk van belang is.
Weet iemand wat de misconfiguratie is?
main.cf
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
| smtpd_banner = $myhostname ESMTP $mail_name biff = no append_dot_mydomain = no delay_warning_time = 4h readme_directory = no smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache myhostname = mx1.mydomain.test alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 maildrop_command = maildrop maildrop_destination_recipient_limit = 1 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all unknown_local_recipient_reject_code = 450 maximal_queue_lifetime = 7d minimal_backoff_time = 1000s maximal_backoff_time = 8000s smtp_helo_timeout = 60s smtpd_recipient_limit = 16 smtpd_soft_error_limit = 3 smtpd_hard_error_limit = 12 smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit smtpd_sender_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, smtpd_data_restrictions = reject_unauth_pipelining smtpd_helo_required = yes smtpd_delay_reject = yes disable_vrfy_command = yes alias_maps = hash:/etc/postfix/aliases alias_database = hash:/etc/postfix/aliases virtual_mailbox_base = /var/spool/mail/virtual virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 virtual_transport = maildrop content_filter = amavis:[127.0.0.1]:10024 |
master.cf
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| smtp inet n - - - - smtpd pickup fifo n - - 60 1 pickup -o content_filter= -o receive_override_options=no_header_body_checks cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp relay unix - - - - - smtp -o smtp_fallback_relay= showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${use r} ${extension} mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} amavis unix - - - - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20 127.0.0.1:10025 inet n - - - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions=reject_unauth_pipelining -o smtpd_end_of_data_restrictions= -o mynetworks=127.0.0.0/8 -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks |