ubuntuusers.de

Fetchmail Fehlermeldung

Status: Ungelöst | Ubuntu-Version: Ubuntu 8.04 (Hardy Heron)
Antworten |

sanitaeter

Anmeldungsdatum:
29. August 2008

Beiträge: 264

Ich bin dabei einen Mail-Server aufzusetzen. Ich möchte die E-Mails mit fetchmail abholen und via Cyrus zustellen. Cyrus läuft, Benutzer und die .fetchmailrc sind angelegt. Wenn ich fetchmail ausführe mit -v (zum Sehen) bekomme ich die Meldung E-Mails seien da. Am Schluss steht dann dort

Nachricht tr@wieauch.immer.de:1 wird ausgelassen nicht geflusht.

Ich möchte die Mailas ohne Postfix direkt an Cyrus übergeben. Deswegen habe ich am Ende einer Zeile der .fetchmailrc folgendes eingetragen:

mda /usr/sbin/cyrusdeliver angegeben. 

Ich bin mir nicht sicher ob das so richtig ist. Ich habe jetzt auch folgende Syntax in der .fetchmailrc benutzt

....keep and wants "/usr/sbin/cyrusdeliver"

Wo legt eigenlich fetchmail die E-Mails ab, die nicht zugestellt wurden? Wer hat einen Link oder eine Idee für mich? Danke schonmal.

sanitaeter

(Themenstarter)

Anmeldungsdatum:
29. August 2008

Beiträge: 264

Ich muss noch ein paar Informationen geben.

1. Versuch: Die .fetchmailrc gehört einem Admin und befindet sich ein seinem Homeverzeichnis >>das führt zur Fehlermeldung "Nachricht tr@wieauch.immer.de:1 wird ausgelassen nicht geflusht"

2. Versuch: Die .fetchmailrc gehört User root und Gruppe root und befindet sich unter /etc. >>das führt zur Fehlermeldung "es wurden keine Mailserver spezifiziert"

Ich habe den Mailserver (beim Provider) richtig in die .fetchmailrc eingegeben (ich arbeite ohne Postfix) und verschiedene Varianten zur Übergabe an den mda versucht. Eigentlich ist fetchmail doch recht einfach, dachte ich zumindest. Hier poste ich mal meine .fetchmailrc:

poll "mail.abcd.de" protocol AUTO : user "tr@abcd.de" there with password "soundso" is "tester" here mda 
"/usr/sbin/cyrdeliver" keep fetchall;

Kann da mal jemand raufschauen wäre nett. Danke.

sanitaeter

(Themenstarter)

Anmeldungsdatum:
29. August 2008

Beiträge: 264

Da bin ich wieder. Habe jetzt herausgefunden wenn die .fetchmailrc im /etc Verzeichnis liegt, muss fetchmail mit dem Befehl

fetchmail /etc/.fetchmailrc

ausgeführt werden (Besitzer root). Jedoch bekomme ich die Fehlermeldung: "konnte kanonischen DNS Namen für /etc/.fetchmailrc nicht finden: Name or service not known". Ich weiß nun überhaupt nicht mehr für welche Möglichkeit ich mich entscheiden soll, Fehlermeldungen produzieren alle. Vielen Dank schonmal. Welche logfiles wären in diesem Zusammenhang interessant?

sanitaeter

(Themenstarter)

Anmeldungsdatum:
29. August 2008

Beiträge: 264

Ich schreibe mir wieder selbst:

Frage 1. Wo liegt die .fetchmailrc besser, im Homeverzeichnis eines Users oder im Verzeichnis /etc/.

Frage 2. Wenn die .fetchmailrc im Verzeichnis /etc/ liegt produziert sie beim Ausführen die Fehlermelung:

Abfragestatus = 11(DNS)

In den man pages steht dazu es gäbe Probleme mit nslookup. Ich benutze extern die DNS-Adressen meines Providers und die sind O.K. Wer kann mir irgenwie weiterhelfen?

Lutki

Avatar von Lutki

Anmeldungsdatum:
17. Juni 2006

Beiträge: 372

zu 1: ich würde sie für diesen Zweck unter /etc/ ablegen (Berechtigungen beachten!)

zu 2: dir fehlt beim Aufruf die Option -f

zu 3: man fetchmail lesen (besonders die Optionen -f -v -L)

sanitaeter

(Themenstarter)

Anmeldungsdatum:
29. August 2008

Beiträge: 264

Vielen Dank, mit -f ist das schon besser. Jetzt kommt noch die Fehlermeldung:

Server CommonName stimmt nicht überein: ens59fl.provider.de != mail.firmenname.de

Trotzdem hat fetchmail die Nachrichten zumindest gelesen. Ich habe mich entschieden doch noch Postfix als mda zwischen fetchmail und cyrus zu setzen. Habe auch schon einiges dazu gelesen und die main.cf und master.cf angepasst, auch den Eintrag der auf cyrus verweist gesetzt. Leider finde ich die abgeholten Mails nicht. Habe schon "posfix check" gemacht, ohne Fehlermeldung. Weder unter /var/spool/mail/username noch unter cyrus (var/spool/cyrus/mail etc.) sind die Mail's.

1. Wo könnte ich noch Fahnden?

2. Benötigt Postfix einen Eintrag in der etc/.fetchmailrc wie : mda "/usr/sbin/posfix"?

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

sanitaeter schrieb:

Habe auch schon einiges dazu gelesen und die main.cf und master.cf angepasst, auch den Eintrag der auf cyrus verweist gesetzt.

Zeig mal, wie du Postfix genau angepasst hast (Ausgabe von postconf -n).

Leider finde ich die abgeholten Mails nicht. Habe schon "posfix check" gemacht, ohne Fehlermeldung. Weder unter /var/spool/mail/username noch unter cyrus (var/spool/cyrus/mail etc.) sind die Mail's.

Wie sehen die Logs aus?

sanitaeter

(Themenstarter)

Anmeldungsdatum:
29. August 2008

Beiträge: 264

Vielen Dank, im WIKI postfix stand die Lösung eines Problems. Ich hatte eine ältere Version der .fetchmailrc. Inzwischen verlangen die Provider exakte Mail-Adressen, da reicht mail.firma.de nicht mehr aus. Habe die .fetchmailrc demenstprechend angepasst und eine damit eine Fehlermeldung weniger. Hier ist meine postconf:

append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
disable_dns_lookups = yes
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
mydestination = $myhostname, localhost.$mydomain
mydomain = domain
myhostname = pcname.domain
mynetworks = 127.0.0.0/8 192.168.1.0/24
myorigin = /etc/mailname
readme_directory = no
relayhost = [mail.firma.de]
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)

sanitaeter

(Themenstarter)

Anmeldungsdatum:
29. August 2008

Beiträge: 264

1. Ich habe gelesen, dass für meine Bedürfnisse (e-mails empfangen über fetchmail, postfix, cyrus / verschicken direkt über den Provider) noch der Eintrag "local only" in der /etc/postfix/main.cf gesetzt werden muss. Wie lautet die genaue Syntax dazu?

2. Ich habe gelesen, ohne procmail bräuchte ich noch einen Eintrag in der main.cf in der Art: meine-domain.de smtp:[exchange, meine.domain.de]-wie lautet die genaue Syntax muss ich "exchange" schreiben? Meine lokale domain heißt: berlin1.bidernet1 (Server Name-Domain Name).

3. In welches Verzeichnis legt fetchmail die E-Mails Standardmäßig ab. Unter /var/spool/mail (tester ist nicht angelegt, weil ich gelesen habe, dass macht postfix selbst) b.z.w. /var/spool/cyrus/mail/t/user/tester (tester ist angelegt mit cyrus) Leider sind die Mail's nicht zu finden, obwohl fetchmail sie zumindest sehen konnte. Meine postconf habe ich gepostet, habe aber den relayhost geändert in den kompletten Namen des Providers (enyz.provider.de).

4. Muss ich denn postfix nach dem Konfigurieren mit "postmap transport" in eine Datenbank schreiben oder habe ich das falsch verstanden?

Ich überlege ob ich den Threat, weil es nicht mehr nur um fetchmail geht,als anders Thema fortführe . Vielen Dank schonmal.

sanitaeter

(Themenstarter)

Anmeldungsdatum:
29. August 2008

Beiträge: 264

Ich habe postfix neu konfiguriert /dpkg-reconfigure) und die Option local only gesetzt. Jetzt kommt beim Ausfüren der .fetchmailrc die Fehlermeldung

smtp-Lauscher mag Empfängeradresse "tester@localhost" nicht". 

Ich poste noch einmal die relevanten Dateien. Die .fetchmailrc:

poll "ens43fk.versatel.de" protocol AUTO : user "tr@firma.de" there with password "xxxx" is "tester" here keep fetchall ;

Die main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no
myorigin = /etc/mailname

relayhost = [ens43fk.versatel.de]
mynetworks = 127.0.0.0/8 192.168.1.0/24
mailbox_size_limit = 0
#recipient_delimiter = 
inet_interfaces = loopback-only
inet_protocols = all
myhostname = berlin1.meineDomain11
mydomain = meineDomain11
mydestination = $myhostname, localhost.$mydomain
mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
disable_dns_lookups = yes
#mailbox_transport = cyrus
#home_mailbox = Maildir/
recipient_delimiter = 
default_transport = error   >>>???
relay_transport = error     >>>???

Und meine imapd.conf (ich denke die ist O.K. Cyrus läuft):

# Debian Cyrus imapd.conf
# $Id: imapd.conf 565 2006-08-14 16:51:28Z sven $
# See imapd.conf(5) for more information and more options

# Configuration directory
configdirectory: /var/lib/cyrus

# Which partition to use for default mailboxes
defaultpartition: default
partition-default: /var/spool/cyrus/mail

# News setup
partition-news: /var/spool/cyrus/news
newsspool: /var/spool/news

# Alternate namespace
# If enabled, activate the alternate namespace as documented in
# /usr/share/doc/cyrus-doc-2.2/html/altnamespace.html, where an user's
# subfolders are in the same level as the INBOX
# See also userprefix and sharedprefix on imapd.conf(5)
altnamespace: no

# UNIX Hierarchy Convention
# Set to yes, and cyrus will accept dots in names, and use the forward
# slash "/" to delimit levels of the hierarchy. This is done by converting
# internally all dots to "^", and all "/" to dots. So the "rabbit.holes"
# mailbox of user "helmer.fudd" is stored in "user.elmer^fud.rabbit^holes"
unixhierarchysep: no

# Rejecting illegal characters in headers
# Headers of RFC2882 messages must not have characters with the 8th bit
# set. However, too many badly-written MUAs generate this, including most
# spamware. Enable this to reject such messages.
#reject8bit: yes

# Munging illegal characters in headers
# Headers of RFC2882 messages must not have characters with the 8th bit
# set. However, too many badly-written MUAs generate this, including most
# spamware. If you kept reject8bit disabled, you can choose to leave the
# crappage untouched by disabling this (if you don't care that IMAP SEARCH
# won't work right anymore.
#munge8bit: no

# Forcing recipient user to lowercase
# Cyrus 2.2 is case-sensitive.  If all your mail users are in lowercase, it is
# probably a very good idea to set lmtp_downcase_rcpt to true.  This is set by 
# default, per RFC2821. This was not set by default in debian versions up to
# and including 2.2.12-4.
lmtp_downcase_rcpt: yes

# Uncomment the following and add the space-separated users who 
# have admin rights for all services.
admins: cyrus

# Space-separated list of users that have lmtp "admin" status (i.e. that
# can deliver email through TCP/IP lmtp). If specified, this parameter
# overrides the "admins" parameter above
#lmtp_admins: postman

# Space-separated list of users that have mupdate "admin" status, in
# addition to those in the admins: entry above. Note that mupdate slaves and 
# backends in a Murder cluster need to autenticate against the mupdate master
# as admin users.
#mupdate_admins: mupdateman

# Space-separated list of users that have imapd "admin" status, in
# addition to those in the admins: entry above
#imap_admins: cyrus

# Space-separated list of users that have sieve "admin" status, in
# addition to those in the admins: entry above
#sieve_admins: cyrus

# List of users and groups that are allowed to proxy for other users,
# seperated by spaces.  Any user listed in this will be allowed to login
# for any other user.  Like "admins:" above, you can have imap_proxyservers
# and sieve_proxyservers.
#proxyservers: cyrus

# No anonymous logins
allowanonymouslogin: no

# Minimum time between POP mail fetches in minutes
popminpoll: 1

# If nonzero, normal users may create their own IMAP accounts by creating
# the mailbox INBOX.  The user's quota is set to the value if it is positive,
# otherwise the user has unlimited quota.
autocreatequota: 0

# umask used by Cyrus programs
umask: 077

# Sendmail binary location
# DUE TO A BUG, Cyrus sends CRLF EOLs to this program. This breaks Exim 3. 
# For now, to work around the bug, set this to a wrapper that calls 
# /usr/sbin/sendmail -dropcr instead if you use Exim 3.
#sendmail: /usr/sbin/sendmail

# If enabled, cyrdeliver will look for Sieve scripts in user's home
# directories: ~user/.sieve.
sieveusehomedir: false

# If sieveusehomedir is false, this directory is searched for Sieve scripts.
sievedir: /var/spool/sieve

# notifyd(8) method to use for "MAIL" notifications.  If not set, "MAIL"
# notifications are disabled.  Valid methods are: null, log, zephyr
#mailnotifier: zephyr

# notifyd(8) method to use for "SIEVE" notifications.  If not set, "SIEVE"
# notifications are disabled.  This method is only used when no method is
# specified in the script.  Valid methods are null, log, zephyr, mailto
#sievenotifier: zephyr

# DRAC (pop-before-smtp, imap-before-smtp) support
# Set dracinterval to the time in minutes to call DRAC while a user is
# connected to the imap/pop services. Set to 0 to disable DRAC (default)
# Set drachost to the host where the rpc drac service is running
#dracinterval: 0
#drachost: localhost

# If enabled, the partitions will also be hashed, in addition to the hashing
# done on configuration directories. This is recommended if one partition has a
# very bushy mailbox tree.
hashimapspool: true

# Allow plaintext logins by default (SASL PLAIN)
allowplaintext: yes

# Force PLAIN/LOGIN authentication only
# (you need to uncomment this if you are not using an auxprop-based SASL
# mechanism.  saslauthd users, that means you!). And pay attention to
# sasl_minimum_layer and allowapop below, too.
sasl_mech_list: PLAIN

# Allow use of the POP3 APOP authentication command.
# Note that this command requires that the plaintext passwords are 
# available in a SASL auxprop backend (eg. sasldb), and that the system
# can provide enough entropy (eg. from /dev/urandom) to create a challenge
# in the banner.
#allowapop: no

# The minimum SSF that the server will allow a client to negotiate. A
# value of 1 requires integrity protection; any higher value requires some
# amount of encryption.
#sasl_minimum_layer: 0

# The maximum SSF that the server will allow a client to negotiate. A
# value of 1 requires integrity protection; any higher value requires some
# amount of encryption.
#sasl_maximum_layer: 256

# List of remote realms whose users may log in using cross-realm
# authentications. Seperate each realm name by a space. A cross-realm
# identity is considered any identity returned by SASL with an "@" in it.
# NOTE: To support multiple virtual domains on the same interface/IP,
# you need to list them all as loginreals. If you don't list them here,
# (most of) your users probably won't be able to log in.
#loginrealms: example.com

# Enable virtual domain support.  If enabled, the user's domain will
# be determined by splitting a fully qualified userid at the last '@'
# or '%' symbol.  If the userid is unqualified, and the virtdomains
# option is set to "on", then the domain will be determined by doing
# a reverse lookup on the IP address of the incoming network
# interface, otherwise the user is assumed to be in the default
# domain (if set).
#virtdomains: userid

# The default domain for virtual domain support
# If the domain of a user can't be taken from its login and it can't
# be determined by doing a reverse lookup on the interface IP, this
# domain is used.
#defaultdomain: 

#
# SASL library options (these are handled directly by the SASL libraries,
# refer to SASL documentation for an up-to-date list of these)
#

# The mechanism(s) used by the server to verify plaintext passwords. Possible
# values are "saslauthd", "auxprop", "pwcheck" and "alwaystrue".  They
# are tried in order, you can specify more than one, separated by spaces.
#
# Do note that, since sasl will be run as user cyrus, you may have a lot of
# trouble to set this up right.
sasl_pwcheck_method: saslauthd

# What auxpropd plugins to load, if using sasl_pwcheck_method: auxprop
# by default, all plugins are tried (which is probably NOT what you want).
#sasl_auxprop_plugin: sasldb

# If enabled, the SASL library will automatically create authentication secrets
# when given a plaintext password. Refer to SASL documentation 
#sasl_auto_transition: no

#
# SSL/TLS Options
#

# File containing the global certificate used for ALL services (imap, pop3,
# lmtp, sieve)
#tls_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem

# File containing the private key belonging to the global server certificate.
#tls_key_file: /etc/ssl/private/ssl-cert-snakeoil.key

# File containing the certificate used for imap. If not specified, the global
# certificate is used.  A value of "disabled" will disable SSL/TLS for imap.
#imap_tls_cert_file: /etc/ssl/certs/cyrus-imap.pem

# File containing the private key belonging to the imap-specific server
# certificate.  If not specified, the global private key is used.  A value of
# "disabled" will disable SSL/TLS for imap.
#imap_tls_key_file: /etc/ssl/private/cyrus-imap.key

# File containing the certificate used for pop3. If not specified, the global
# certificate is used.  A value of "disabled" will disable SSL/TLS for pop3.
#pop3_tls_cert_file: /etc/ssl/certs/cyrus-pop3.pem

# File containing the private key belonging to the pop3-specific server
# certificate.  If not specified, the global private key is used.  A value of
# "disabled" will disable SSL/TLS for pop3.
#pop3_tls_key_file: /etc/ssl/private/cyrus-pop3.key

# File containing the certificate used for lmtp. If not specified, the global
# certificate is used.  A value of "disabled" will disable SSL/TLS for lmtp.
#lmtp_tls_cert_file: /etc/ssl/certs/cyrus-lmtp.pem

# File containing the private key belonging to the lmtp-specific server
# certificate.  If not specified, the global private key is used.  A value of
# "disabled" will disable SSL/TLS for lmtp.
#lmtp_tls_key_file: /etc/ssl/private/cyrus-lmtp.key

# File containing the certificate used for sieve. If not specified, the global
# certificate is used.  A value of "disabled" will disable SSL/TLS for sieve.
#sieve_tls_cert_file: /etc/ssl/certs/cyrus-sieve.pem

# File containing the private key belonging to the sieve-specific server
# certificate.  If not specified, the global private key is used.  A value of
# "disabled" will disable SSL/TLS for sieve.
#sieve_tls_key_file: /etc/ssl/private/cyrus-sieve.key

# File containing one or more Certificate Authority (CA) certificates.
#tls_ca_file: /etc/ssl/certs/cyrus-imapd-ca.pem

# Path to directory with certificates of CAs.
tls_ca_path: /etc/ssl/certs

# The length of time (in minutes) that a TLS session will be cached for later
# reuse.  The maximum value is 1440 (24 hours), the default.  A value of 0 will
# disable session caching.
tls_session_timeout: 1440

# The list of SSL/TLS ciphers to allow, in decreasing order of precedence.  
# The format of the string is described in ciphers(1).  The Debian default
# selects TLSv1 high-security ciphers only, and removes all anonymous ciphers
# from the list (because they provide no defense against man-in-the-middle
# attacks).  It also orders the list so that stronger ciphers come first.
tls_cipher_list: TLSv1+HIGH:!aNULL:@STRENGTH

# Require a client certificate for ALL services (imap, pop3, lmtp, sieve).
#tls_require_cert: false

# Require a client certificate for imap ONLY.
#imap_tls_require_cert: false

# Require a client certificate for pop3 ONLY.
#pop3_tls_require_cert: false

# Require a client certificate for lmtp ONLY.
#lmtp_tls_require_cert: false

# Require a client certificate for sieve ONLY.
#sieve_tls_require_cert: false

#
# Cyrus Murder cluster configuration
#
# Set the following options to the values needed for this server to
# autenticate against the mupdate master server:
# mupdate_server
# mupdate_port
# mupdate_username
# mupdate_authname
# mupdate_realm
# mupdate_password
# mupdate_retry_delay

##
## KEEP THESE IN SYNC WITH cyrus.conf
##
# Unix domain socket that lmtpd listens on.
lmtpsocket: /var/run/cyrus/socket/lmtp

# The idle backend to use for IDLE command.
# Options: poll (default), idled, no
# poll doesn't need the idled daemon and is supposed to be more robust.
# however it doesn't update as quickly as the idled backend does. "no"
# turns off IDLE support. If set to "idled", you will also need to enable
# the "idled" entry in cyrus.conf.
idlemethod: poll

# Unix domain socket that idled listens on.
idlesocket: /var/run/cyrus/socket/idle

# Unix domain socket that the new mail notification daemon listens on.
notifysocket: /var/run/cyrus/socket/notify

# Syslog prefix. Defaults to cyrus (so logging is done as cyrus/imap etc.)
syslog_prefix: cyrus

##
## DEBUGGING
##
# Debugging hook. See /usr/share/doc/cyrus-common-2.2/README.Debian.debug
# Keep the hook disabled when it is not in use
#
# gdb Back-traces
#debug_command: /usr/bin/gdb -batch -cd=/tmp -x /usr/lib/cyrus/get-backtrace.gdb /usr/lib/cyrus/bin/%s %d >/tmp/gdb-backtrace.cyrus.%1$s.%2$d <&- 2>&1 &
#
# system-call traces
#debug_command: /usr/bin/strace -tt -o /tmp/strace.cyrus.%s.%d -p %2$d <&- 2>&1 &
#
# library traces
#debug_command: /usr/bin/ltrace -tt -n 2 -o /tmp/ltrace.cyrus.%s.%d -p %2$d <&- 2>&1 &

Wäre wirklich nett, wenn mal jemand raufschauen könnte besonders die main.cf scheint kritisch zu sein. Ich überlege ob ich postfix rausnehme und wieder von fetchmail direkt an cyrus übergebe. Postfix brauche ich zum Senden nicht, dass regele ich direkt über den Provider.

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

Du hast in deiner fetchmail-Konfiguration nur den Local-Part deiner Zieladresse angegeben. Dadurch, dass fetchmail automatisch @localhost anhängt, fühlt sich Postfix nicht zuständig, da mydestination localhost nicht enthält.

Erweitere die fetchmail-Konfiguration doch noch um den Domain-Part:

poll "ens43fk.versatel.de" protocol AUTO : user "tr@firma.de" there with password "xxxx" is "tester@berlin1.meineDomain11" here keep fetchall ;

sanitaeter

(Themenstarter)

Anmeldungsdatum:
29. August 2008

Beiträge: 264

Ja Super, das hat funktioniert. Viele Dank an dich xabbuh, endlich läuft das. Ich schreibe später noch was dazu und stelle dann auf gelöst. Ich muss mal sagen, es ist wirklich super wie einem geholfen wird. Obwohl man da in meinem Fall sicherlich Geduld braucht. ☺

Antworten |