PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Linux Mail Server Problem



Levi
07.04.09, 11:29
Hi alle mit einander

Ich habe ein Problem mit meinem E-Mail Server und komme nicht weiter habe alle möglichen
how- tos durch gesehen aber ich finde den Fehler nicht vielleicht findet ihn jemand hier.
Also meine Aufgabe ist es ein E-Mail Server zu Konfigurieren und ich Benutze
Suse Linux Enterprise Server 10.1 als plattform.
Der Server ist Postfix mit Cyrus-Imap. Die E-Mails sollen vom Client abgeholt werden mit dem client Programm Thunderbird. Der Server wird in einem Intranet stehen und keine Verbindung zum Internet haben. Geplant sind mehr als 40 E-Mail Postfächer später vielleicht mehr wenn die Mitarbeiter zahl sich vergrößert.
Da es kein direktes How-to gibt was zu mir gepasst hat habe ich mir mehr oder weniger aus vielen was immer was raus genommen was passte. Und ich denke hier habe ich irgend wo einen Fehler gemacht.

Also Postfix läuft soweit(ok im Terminal) aber wenn ich E-Mails versenden will also erstmal auf dem Server zum testen kommen die Mails nicht in den Postfächern an. Sie sind aber auch nicht in dem Queue Ordner drin.
Cyrus- Imap ist auch alles Konfiguriert(ok im Terminal) und mit cyradm wurden für die Benutzer auch schon Postfächer angelegt.

Das Nächste Problem ist das wenn ich Thunderbird mit dem smtp verbinden will er mir sagt
„Konnte keine Verbindung mit dem Mail-Server linux-mail.soemmerda.kts-group.local aufbauen, da sie verweigert wurde. „

Ich glaube das diese Fehler alle mit einander zusammenhängen oder ich einfach einen Riesen denk Fehler gemacht habe.

Also wenn mir jemand helfen kann aus dem Chaos was Funktionierendes zu machen wäre ich dankbar.

/etc/postfix/main.cf


readme_directory = /usr/share/doc/packages/postfix/README_FILES
inet_protocols = all
biff = no
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = linux-mail.soemmerda.kts-group.local
program_directory = /usr/lib/postfix
inet_interfaces = localhost
mydestination = $myhostname,$mydomain, localhost.$mydomain
defer_transports = smtp
disable_dns_lookups = yes
mailbox_transport = Cyrus
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_invalid_hostname
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, reject_unknown_recipient_domain, permit_sasl_authenticated
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
smtp_use_tls = yes
alias_maps = hash:/etc/aliases
mailbox_size_limit = 11240000
mynetworks = 127.0.0.0/8, 10.20.20.0/24

broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
smtpd_client_restrictions = reject_invalid_hostname reject_rbl_client relays.ordb.org
smtpd_banner = $myhostname ESMTP Mailserver
empty_address_recipient = root
queue_directory = /var/spool/postfix
mail_owner = postfix
broken_sasl_auth_clients = yes
local_transport = cyrus


/etc/imapd.conf


configdirectory: /var/lib/imap
partition-default: /var/spool/imap
sievedir: /var/lib/sieve
admins: cyrus
allowanonymouslogin: no
autocreatequota: 20000
reject8bit: no
quotawarn: 90
timeout: 180
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: saslauthd
lmtp_overquota_perm_failure: no
lmtp_downcase_rcpt: yes
#
# if you want TLS, you have to generate certificates and keys
#
#tls_cert_file: /usr/ssl/certs/cert.pem
#tls_key_file: /usr/ssl/certs/skey.pem
#tls_ca_file: /usr/ssl/CA/CAcert.pem
#tls_ca_path: /usr/ssl/CA
lmtpsocket: /var/lib/imap/socket/lmtp


/etc/Cyrus.conf


# standard standalone server implementation

START {
# do not delete this entry!
recover cmd="ctl_cyrusdb -r"

# this is only necessary if using idled for IMAP IDLE
idled cmd="idled"
}

# UNIX sockets start with a slash and are put into /var/lib/imap/socket
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=0
# imaps cmd="imapd -s" listen="imaps" prefork=0
pop3 cmd="pop3d" listen="pop3" prefork=0
# pop3s cmd="pop3d -s" listen="pop3s" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0

# at least one LMTP is required for delivery
lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=0

# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" prefork=1
}

EVENTS {
# this is required
checkpoint cmd="ctl_cyrusdb -c" period=30

# this is only necessary if using duplicate delivery suppression
delprune cmd="cyr_expire -E 3" at=0400

# this is only necessary if caching TLS sessions
tlsprune cmd="tls_prune" at=0400

# Uncomment the next entry, if you want to automatically remove
# old messages of EVERY user.
# This example calls ipurge every 60 minutes and ipurge will delete
# ALL messages older then 30 days.
# enter 'man 8 ipurge' for more details

# cleanup cmd="ipurge -d 30 -f" period=60
}


Mfg

stefaan
07.04.09, 12:21
Servus!

Was steht nach der Thunderbird-Meldung im Maillog?

Grüße, Stefan

Levi
07.04.09, 12:55
Das steht da wenn ich mit Thunderbird versuche eine Verbindung herzustellen.
mail

Apr 7 09:57:06 linux-mail postfix/pickup[5316]: 134BE17F82: uid=0 from=<root@linux-mail.soemmerda.kts-group.local>
Apr 7 09:57:06 linux-mail postfix/cleanup[5744]: 134BE17F82: message-id=<1239091025.5740@linux-mail.soemmerda.kts-group.local>
Apr 7 09:57:06 linux-mail postfix/qmgr[5317]: 134BE17F82: from=<root@linux-mail.soemmerda.kts-group.local>, size=660, nrcpt=1 (queue active)
Apr 7 09:57:06 linux-mail postfix/pipe[5750]: 134BE17F82: to=<root@linux-mail.soemmerda.kts-group.local>, relay=cyrus, delay=0, status=bounced (data format error. Command output: root: Mailbox does not exist )
Apr 7 09:57:06 linux-mail postfix/cleanup[5744]: 474EE19042: message-id=<20090407075706.474EE19042@linux-mail.soemmerda.kts-group.local>
Apr 7 09:57:06 linux-mail postfix/qmgr[5317]: 474EE19042: from=<>, size=2676, nrcpt=1 (queue active)
Apr 7 09:57:06 linux-mail postfix/qmgr[5317]: 134BE17F82: removed
Apr 7 09:57:06 linux-mail postfix/pipe[5750]: 474EE19042: to=<root@linux-mail.soemmerda.kts-group.local>, relay=cyrus, delay=0, status=bounced (data format error. Command output: root: Mailbox does not exist )
Apr 7 09:57:06 linux-mail postfix/qmgr[5317]: 474EE19042: removed
Apr 7 09:57:18 linux-mail postfix/postfix-script: warning: /var/spool/postfix/etc/nsswitch.conf and /etc/nsswitch.conf differ
Apr 7 09:57:18 linux-mail postfix/postfix-script: warning: /var/spool/postfix/etc/pam.d/smtp and /etc/pam.d/smtp differ
Apr 7 09:57:18 linux-mail postfix/postfix-script: warning: /var/spool/postfix/etc/sasldb2 and /etc/sasldb2 differ
Apr 7 09:57:18 linux-mail postfix/postfix-script: warning: /var/spool/postfix/etc/passwd and /etc/passwd differ
Apr 7 09:57:18 linux-mail postfix/postfix-script: warning: /var/spool/postfix/usr/lib/sasl2/smtpd.conf and /usr/lib/sasl2/smtpd.conf differ
Apr 7 11:49:36 linux-mail postfix/postfix-script: warning: /var/spool/postfix/etc/nsswitch.conf and /etc/nsswitch.conf differ
Apr 7 11:49:36 linux-mail postfix/postfix-script: warning: /var/spool/postfix/etc/pam.d/smtp and /etc/pam.d/smtp differ
Apr 7 11:49:36 linux-mail postfix/postfix-script: warning: /var/spool/postfix/etc/sasldb2 and /etc/sasldb2 differ
Apr 7 11:49:36 linux-mail postfix/postfix-script: warning: /var/spool/postfix/etc/passwd and /etc/passwd differ
Apr 7 11:49:36 linux-mail postfix/postfix-script: warning: /var/spool/postfix/usr/lib/sasl2/smtpd.conf and /usr/lib/sasl2/smtpd.conf differ

Levi
07.04.09, 13:48
/var/log/mail.err


Apr 7 12:35:38 linux-mail postfix/smtpd[6821]: fatal: bad numerical configuration: unknown_local_recipient_reject_code = 550 relayhost = [an.ip.add.ress]:25 home_mailbox = Mailbox home_mailbox = Maildir/ mail_spool_directory = /var/spool/imap mailbox_transport = lmtp:unix:/file/name debug_peer_level = 2bytes
Apr 7 12:36:39 linux-mail postfix/smtpd[6822]: fatal: bad numerical configuration: unknown_local_recipient_reject_code = 550 relayhost = [an.ip.add.ress]:25 home_mailbox = Mailbox home_mailbox = Maildir/ mail_spool_directory = /var/spool/imap mailbox_transport = lmtp:unix:/file/name debug_peer_level = 2bytes
Apr 7 12:37:40 linux-mail postfix/smtpd[6823]: fatal: bad numerical configuration: unknown_local_recipient_reject_code = 550 relayhost = [an.ip.add.ress]:25 home_mailbox = Mailbox home_mailbox = Maildir/ mail_spool_directory = /var/spool/imap mailbox_transport = lmtp:unix:/file/name debug_peer_level = 2bytes

stefaan
07.04.09, 17:40
Servus!

Zur Konfig:

-) Ist 2x drinnen: Bei mir ist es klein geschrieben.


mailbox_transport = cyrus
mailbox_transport = Cyrus


-) Du wirst nur vom lokalen PC Mails über diesen Server verschicken können:


inet_interfaces = localhost


-) Root hat es lieber, wenn man ihm einen Alias in der /etc/aliases anlegt. Steht auch in dieser Datei beschrieben. newaliases nachher nicht vergessen.
Daher diese Fehlermeldung:


Apr 7 09:57:06 linux-mail postfix/pipe[5750]: 134BE17F82: to=<root@linux-mail.soemmerda.kts-group.local>, relay=cyrus, delay=0, status=bounced (data format error. Command output: root: Mailbox does not exist )


Grüße, Stefan

Levi
14.04.09, 07:53
Hi Stefaan


Der Server ist ja auch noch garnicht am Netzwerk angeschlossen.
Und das thunderbird ist auf dem server installiert zum testen.
den Fehler mit mailbox_transport habe ich gefunden danke.

alias habe ich angelegt
so
root: linux-mail,\root newaliases ist ausgeführt

trotzdem gibts wohl immer noch Fehler habe Gemerkt das ich vergessen hatte mydomain= anzugeben aber wenn ich das tue startet postfix nicht mehr.

mfg

Stormbringer
14.04.09, 08:06
trotzdem gibts wohl immer noch Fehler habe Gemerkt das ich vergessen hatte mydomain= anzugeben aber wenn ich das tue startet postfix nicht mehr.

Dann schau doch in der Protokolldatei nach, warum postfix nicht mehr startet.

Levi
14.04.09, 08:53
Okay Postfix läuft obwohl ich Domain angegeben habe.

Das eigentlich Problem besteht aber immer noch.

bla!zilla
14.04.09, 10:50
Hast du unter Cyrus überhaupt Postfächer mittels cyradm angelegt? Wenn nicht, dann solltest du das nachholen.

Levi
14.04.09, 10:53
ja postfächer sind angelegt per cyradm und rechte sind auch vergeben wie es in den how-tos steht.
Das ist ja das was ich nicht verstehe er sagt mir das die mail-box nicht existiert aber sie sind da.

bla!zilla
14.04.09, 10:54
Poste mal die master.cf von Postfix. Außerdem passen einige Configfiles im Chroot von Postfix nicht mehr. Entweder Chroot auflösen oder richtig konfigurieren.

Levi
14.04.09, 11:08
etc/postfix/Master.cf


#
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - n - - smtpd -v
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
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
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error 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
#localhost:10025 inet n - n - - smtpd -o content_filter=
scache unix - - n - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe flags=R
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}