Suse12.1 Postfix/Procmail

Postfix, QMail, Sendmail, Dovecot, Cyrus, Courier, Anti-Spam
amiga1200
Posts: 213
Joined: 2007-01-13 19:58
 

Suse12.1 Postfix/Procmail

Post by amiga1200 »

Ich bin dabei Postfix als Mailserver zu installieren.
Der Stand ist: Mail über ein Windows Rechner sendet der Server raus.
Wenn ich was zum Server sende test@test.de
landen die auch schon in /var/mail.
Ich vermute, das Procmail nicht läuft, laut yast2 ist es aber installiert.
Schaue ich unter /etc finde ich kein procmail Verzeichnis.
unter var/log/procmail finde ich auch nichts, daher wohl auch
die 1.Zeile im Log


das Log sagt:

Code: Select all

queue active)
Jun 18 17:09:20 test procmail[3769]: Error while writing to "/var/log/procmail"
Jun 18 17:09:20 test spamc[3772]: connect to spamd on 127.0.0.1 failed, retrying (#1 of 3): Connection refused
Jun 18 17:09:20 test postfix/smtpd[3753]: disconnect from bx-ob.rzone.de[81.169.146.153]
Jun 18 17:09:21 test spamc[3772]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3): Connection refused
Jun 18 17:09:22 test spamc[3772]: connect to spamd on 127.0.0.1 failed, retrying (#3 of 3): Connection refused
Jun 18 17:09:23 test spamc[3772]: connection attempt to spamd aborted after 3 retries
Jun 18 17:09:23 test postfi
die main.cf

Code: Select all

alias_maps = hash:/etc/aliases
biff = no
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = 
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
defer_transports = 
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mailbox_transport = 
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = 
masquerade_exceptions = root
message_size_limit = 0
message_strip_characters = \0
mydestination = $myhostname, localhost.$mydomain
myhostname = test.de
mynetworks = xxx.xxx.xxx.192/27, 127.0.0.1/32
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_clientcerts = 
relayhost = 
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_enforce_tls = no
smtp_sasl_auth_enable = no
smtp_sasl_password_maps = 
smtp_sasl_security_options = 
smtp_tls_CAfile = 
smtp_tls_CApath = 
smtp_tls_cert_file = 
smtp_tls_key_file = 
smtp_tls_session_cache_database = 
smtp_use_tls = no
smtpd_client_restrictions = 
smtpd_helo_required = no
smtpd_helo_restrictions = 
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_tls_CAfile = 
smtpd_tls_CApath = 
smtpd_tls_ask_ccert = no
smtpd_tls_cert_file = 
smtpd_tls_key_file = 
smtpd_tls_received_header = no
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual
amiga1200
Posts: 213
Joined: 2007-01-13 19:58
 

Re: Suse12.1 Postfix/Procmail

Post by amiga1200 »

Nach etlichen Stunden habe ich es hinbekommen.
Postfix/Dovecot laufen.

Nun wollte ich SpamAssassin integrieren:
Ich bin nach dieser Anleitung vorgegangen:
http://serversupportforum.de/forum/faqs ... ieren.html
Der Server nimmt keine aber Mails mehr an

Ich bekomme im Log:

Code: Select all

warning: mail_queue_enter: create file maildrop/433173.16924: Permission denie
Laut Anleitung gehört in /usr/bin/postfixfilter

Code: Select all

#!/bin/bash
/usr/bin/spamc | /usr/sbin/sendmail -i "$@"
exit $?
Aber warum steht hier sendmail? das ist hier nicht installiert
ich benutzt doch postfix
ich verstehe ich irgendwas falsch?
Nehme ich SpamAssassin in der Master.cf wieder raus, läuft alles wieder
normal, aber ohne SpamAssassin.
Hat jemand vielleicht ein Typ?
User avatar
Joe User
Project Manager
Project Manager
Posts: 11184
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Suse12.1 Postfix/Procmail

Post by Joe User »

sendmail und Sendmail sind zwei verschiedene Dinge. Sendmail ist der MTA, also der Mailserver, während sendmail ein Konsolenprogramm zum Versenden von Mails ist.

Bitte erstmal die aktuellen Konfigurationen posten:

Code: Select all

postconf -n
dovecot -n
grep -v '^#' /etc/postfix/master.cf
ls -alh /var/spool/postfix
ls -alh /usr/bin/postfixfilter
id `ls /usr/bin/postfixfilter | awk '{print $3}'`
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
amiga1200
Posts: 213
Joined: 2007-01-13 19:58
 

Re: Suse12.1 Postfix/Procmail

Post by amiga1200 »

Vielen Dank für die Sendmail Erklärung,
ich hatte oft Postfix/ Spamassassin unter Suse 11 installiert, das ging immer ohne Probleme, aber unter Suse 12.1 harkt es an jede Ecke!
Ich habe schon Stunden gegoogle, aber nichts gefunden.


Postfix:

Code: Select all

alias_maps = hash:/etc/aliases
biff = no
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = 
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
defer_transports = 
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mailbox_transport = 
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = 
masquerade_exceptions = root
message_size_limit = 0
message_strip_characters = \0
mydestination = $myhostname, localhost.$mydomain
myhostname = test.de
mynetworks = 212.xx.xx.xx/27, 127.0.0.1/32
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_clientcerts = 
relayhost = 
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_enforce_tls = no
smtp_sasl_auth_enable = no
smtp_sasl_password_maps = 
smtp_sasl_security_options = 
smtp_tls_CAfile = 
smtp_tls_CApath = 
smtp_tls_cert_file = 
smtp_tls_key_file = 
smtp_tls_session_cache_database = 
smtp_use_tls = no
smtpd_client_restrictions = 
smtpd_helo_required = no
smtpd_helo_restrictions = 
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_tls_CAfile = 
smtpd_tls_CApath = 
smtpd_tls_ask_ccert = no
smtpd_tls_cert_file = 
smtpd_tls_key_file = 
smtpd_tls_received_header = no
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual
Dovecot:

Code: Select all

# OS: Linux 3.1.10-1.9-desktop x86_64 openSUSE 12.1 (x86_64) 
protocols: pop3
ssl: no
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/pop3-login
mail_location: mbox:~/mail:INBOX=/var/mail/%u
mail_executable: /usr/lib/dovecot/pop3
mail_plugin_dir: /usr/lib64/dovecot/modules/pop3
lda:
  mail_plugin_dir: /usr/lib64/dovecot/modules/lda
auth default:
  passdb:
    driver: pam
  userdb:
    driver: passwd
grep -v '^#' /etc/postfix/master.cf

Code: Select all

smtp      inet  n       -       n       -       -       smtpd   -o content_filter=spamfilter:
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
spamfilter unix -       n       n       -       -       pipe
  flags=Rq user=filter argv=/usr/bin/postfixfilter -f ${sender} -- ${recipient}


dovecot   unix  -       n       n       -       25      pipe
  flags=DRhu user=_dovecot:mail argv=/usr/libexec/dovecot/deliver -d ${user}
ls -alh /var/spool/postfix

Code: Select all

 total 512
drwxr-xr-x 16 postfix root     384 May 10 11:44 .
drwxr-xr-x 16 root    root     416 Jun 13 19:14 ..
drwx------  2 postfix root      48 Jun 19 14:20 active
drwx------  2 postfix root      48 Jun 19 13:46 bounce
drwx------  2 postfix root      48 May 10 11:44 corrupt
drwx------  3 postfix root      72 Jun 19 12:25 defer
drwx------  3 postfix root      72 Jun 19 12:25 deferred
drwx------  2 postfix root      88 Jun 19 12:25 flush
drwx------  2 postfix root      48 May 10 11:44 hold
drwx------  2 postfix root      48 Jun 19 14:20 incoming
drwx-wx---  2 postfix maildrop  48 Jun 18 14:43 maildrop
drwxr-xr-x  2 root    root     368 Jun 19 12:25 pid
drwx------  2 postfix root     544 Jun 19 13:20 private
drwx--x---  2 postfix maildrop 168 Jun 19 13:20 public
drwx------  2 postfix root      48 May 10 11:44 saved
drwx------  2 postfix root      48 May 10 11:44 trace
-rwxr-xr-x 1 filter root 67 Jun 19 13:41 /usr/bin/postfixfilter
inhalt:

Code: Select all

#!/bin/bash
/usr/bin/spamc | /usr/sbin/sendmail -i "$@"

exit $?



id `ls /usr/bin/postfixfilter | awk '{print $3}'`

Code: Select all

uid=0(root) gid=0(root) groups=0(root)