mit lokalen mailserver mails speichern [gelöst]
mit lokalen mailserver mails speichern [gelöst]
hallo gemeinde,
ich brauche mal einen rat von experten:
ich habe einen lokalen mailserver mit exim4 eingerichtet. exim4 ist ja für den mailausgagng zuständig. den hab ich auch eingerichtet und funktioniert auch soweit. ich möchte aber folgendes haben:
mein lokaler mailserver soll immer in gewissen abständen mails von meinem gmx-konto abholen, aussortieren, auf spam untersuchen und dann auf meinem lokalen mailserver speichern. ich möchte dann die mails entweder mit dem client rechner abholen oder eben mit meinem tablet vom internet. man kann ja auch die mails mit fetchmail holen aber dann habe ich die ja auf dem client rechner und kann die dann nicht mehr vom internet mit dem tablet abholen oder irre ich mich da?
kann mir das einer einigermaßen verständlich erklären oder verstehe ich da irgendwo was falsch?
bin für jede antwort dankbar.
gruß
olaf
ich brauche mal einen rat von experten:
ich habe einen lokalen mailserver mit exim4 eingerichtet. exim4 ist ja für den mailausgagng zuständig. den hab ich auch eingerichtet und funktioniert auch soweit. ich möchte aber folgendes haben:
mein lokaler mailserver soll immer in gewissen abständen mails von meinem gmx-konto abholen, aussortieren, auf spam untersuchen und dann auf meinem lokalen mailserver speichern. ich möchte dann die mails entweder mit dem client rechner abholen oder eben mit meinem tablet vom internet. man kann ja auch die mails mit fetchmail holen aber dann habe ich die ja auf dem client rechner und kann die dann nicht mehr vom internet mit dem tablet abholen oder irre ich mich da?
kann mir das einer einigermaßen verständlich erklären oder verstehe ich da irgendwo was falsch?
bin für jede antwort dankbar.
gruß
olaf
Zuletzt geändert von orbb am 07.07.2015 22:29:00, insgesamt 1-mal geändert.
Re: mit lokalen mailserver mails speichern
Hi.
EXIM ist ein MTA (Mail Transport Agent). Dieser wird zum "transportieren" von Mails verwendet. Um die Mails intern vorrätig zu halten benötigst du noch einen eigenen Mailserver. Beispielsweise Dovecot, Cyrus, Zarafa, SOGo, ... Wenn dann der Router noch entsprechend eingerichtet ist und der Server dadurch von Außen, z. B. per NAT, erreichbar ist, dann kann man auch die Mails von einem beliebigen Ort mit Internetzugang abrufen. Ob dass dann noch Spaß macht (Upload des Internetanschlusses, wo der Server steht) ist die andere Sache.
Spam filtern ist so eine Sache. Manche Spamfilter sind ziemlich Restriktiv und können auch Mails, die man eigentlich möchte, einfach rauswerfen. Ich verwende für alle meine Mailserver Greylisting (siehe Beispielsweise Postgrey) und RBL-Listen. Spam-Filtering mache ich immernoch Manuell.
Es gibt dann auch einige Tools wie Spamassassin oder ASSP um Spam zu vermeiden. Die funktionieren dann, je nach Einstellung, gut oder schlechter...
EXIM ist ein MTA (Mail Transport Agent). Dieser wird zum "transportieren" von Mails verwendet. Um die Mails intern vorrätig zu halten benötigst du noch einen eigenen Mailserver. Beispielsweise Dovecot, Cyrus, Zarafa, SOGo, ... Wenn dann der Router noch entsprechend eingerichtet ist und der Server dadurch von Außen, z. B. per NAT, erreichbar ist, dann kann man auch die Mails von einem beliebigen Ort mit Internetzugang abrufen. Ob dass dann noch Spaß macht (Upload des Internetanschlusses, wo der Server steht) ist die andere Sache.
Spam filtern ist so eine Sache. Manche Spamfilter sind ziemlich Restriktiv und können auch Mails, die man eigentlich möchte, einfach rauswerfen. Ich verwende für alle meine Mailserver Greylisting (siehe Beispielsweise Postgrey) und RBL-Listen. Spam-Filtering mache ich immernoch Manuell.
Es gibt dann auch einige Tools wie Spamassassin oder ASSP um Spam zu vermeiden. Die funktionieren dann, je nach Einstellung, gut oder schlechter...
Georg
RTFM, LMGTFY, Orakel... Ach... Warum muss man suchen...
Schrödingers Backup --- "Der Zustand eines Backups ist unbekannt, solange man es nicht wiederherstellt" --- Quelle: Nixcraft
RTFM, LMGTFY, Orakel... Ach... Warum muss man suchen...
Schrödingers Backup --- "Der Zustand eines Backups ist unbekannt, solange man es nicht wiederherstellt" --- Quelle: Nixcraft
Re: mit lokalen mailserver mails speichern
also ich hoff ich habe es richtig verstanden:
exim ist rein nur für den mailversand verantwortlich (das wusste ich bereits)
dovecot läd dann die mails von meinem gmx account runter und speichert die an meinem mailserver
danach kann ich mit meinem mailclient (z.b. icedove) die mails abrufen
ist das so richtig?
exim ist rein nur für den mailversand verantwortlich (das wusste ich bereits)
dovecot läd dann die mails von meinem gmx account runter und speichert die an meinem mailserver
danach kann ich mit meinem mailclient (z.b. icedove) die mails abrufen
ist das so richtig?
Re: mit lokalen mailserver mails speichern
Nicht ganz. Ein MTA (Postfix, Exim, Sendmail...) ist für Versand und das annehmen der Mails zuständig. Entweder bekommt er die Mails von einem weiteren Programm (fetchmail z. B.) welches die Mails bei deinem Provider abholt oder die Mails werden direkt, von den Seervern bei deinem Exim eingeliefert (hierzu wäre es aber sehr gut, wen du eine statische IP hättest). Postfix sortiert die Mails dann in deine lokalen Postfächer oder übergibt sie an z. B. Dovecot, welcher die Mails dann in das jeweilige IMAP- Postfach einsortiert.
JETZT kannst du auf deine Mails zugreifen
. Wenn das allerdings von außen erreichbar sein soll, empfehle ich dir, dich noch etwas mehr mit der Sache zu beschäftigen. Du hast sonst schneller eine Viren- oder Spamschleuder aufgebaut als dir lieb ist
.
Noch zu gbottis Post. Zarafa und SOGo passen irgendwie nicht in die Reihe, beide nutzen (iirc Standardmässig) Dovecot als IMAP-Server).
HTH
Paddie
JETZT kannst du auf deine Mails zugreifen


Noch zu gbottis Post. Zarafa und SOGo passen irgendwie nicht in die Reihe, beide nutzen (iirc Standardmässig) Dovecot als IMAP-Server).
HTH
Paddie
Re: mit lokalen mailserver mails speichern
Benutzt du Fetchmail bleiben mit der Funktion keep die Mails auf dem Server des Providers und es wird lediglich eine Kopie heruntergezogen.
Re: mit lokalen mailserver mails speichern
vielen dank für die ausführliche beschreibung..
http://home.arcor.de/hm-gerhards/linux/linux_imap.html
das ist klar...ich will das ja auch erstmal schritt für schritt verstehen was ich da machen muss....das wäre ja auch erst der letzte schritt. ich habe schon etliche anleitungen gelesen aber da schreibt jeder etwas anderes was mich dann unsicher macht. jetzht hab ich mal ne gute anleitung gefunden (hoffe ich):Wenn das allerdings von außen erreichbar sein soll, empfehle ich dir, dich noch etwas mehr mit der Sache zu beschäftigen. Du hast sonst schneller eine Viren- oder Spamschleuder aufgebaut als dir lieb ist.
http://home.arcor.de/hm-gerhards/linux/linux_imap.html
meinst mit der stat. ip meinen lokalen mailserver ?die Mails werden direkt, von den Seervern bei deinem Exim eingeliefert (hierzu wäre es aber sehr gut, wen du eine statische IP hättest)
das verstehe ich so das des nur über port weilerleitung geht, ist das richtig?oder die Mails werden direkt, von den Seervern bei deinem Exim eingeliefert (hierzu wäre es aber sehr gut, wen du eine statische IP hättest)
ich dachte man kann entweder exim oder postfix verwenden?Postfix sortiert die Mails dann in deine lokalen Postfäche
Re: mit lokalen mailserver mails speichern
so , jetzt hab ich glaub ich alles soweit eingerichtet. nun wollte ich mit meinem client rechner eine mail versenden mit icedove und da kam dann folgender fehler:
ich hab schon überall durchgeschaut und nichts gefunden darüber. kann mir jemand sagen was das bedeutet?
Code: Alles auswählen
Fehler beim Senden der Nachricht: Der Mail-Server sendete eine ungültige Begrüßung: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED] Dovecot ready..
Re: mit lokalen mailserver mails speichern
Du hast Dich mit dem IMAP-Server verbunden anstatt mit dem SMTP-Server. Das sollte je nach Einstellung Port 25, 465 oder 587 sein.
Re: mit lokalen mailserver mails speichern
Seit wann nutzt denn Zarafa Dovecot als IMAP-Server? Das wäre mir neu.Paddie hat geschrieben: Noch zu gbottis Post. Zarafa und SOGo passen irgendwie nicht in die Reihe, beide nutzen (iirc Standardmässig) Dovecot als IMAP-Server).
Georg
RTFM, LMGTFY, Orakel... Ach... Warum muss man suchen...
Schrödingers Backup --- "Der Zustand eines Backups ist unbekannt, solange man es nicht wiederherstellt" --- Quelle: Nixcraft
RTFM, LMGTFY, Orakel... Ach... Warum muss man suchen...
Schrödingers Backup --- "Der Zustand eines Backups ist unbekannt, solange man es nicht wiederherstellt" --- Quelle: Nixcraft
Re: mit lokalen mailserver mails speichern
gbotti hat geschrieben:Seit wann nutzt denn Zarafa Dovecot als IMAP-Server? Das wäre mir neu.Paddie hat geschrieben: Noch zu gbottis Post. Zarafa und SOGo passen irgendwie nicht in die Reihe, beide nutzen (iirc Standardmässig) Dovecot als IMAP-Server).
Ich hab in letzter Zeit einige Groupwares ausprobiert, darunter auch Zarafa inkl. IMAP-Funktion. Ich war der Meinung da wäre ein Dovecot drunter gewesen. Kann aber sein, dass ich mich täusche.
Habe es nur kurz angetestet und dann wegen der fehlenden bzw nur dazukaufbaren Outlook-Integration wieder verworfen. Es ist dann bei uns Horde geworden wo jetzt 12 Windows Rechner mit Outlook 2013 dranhängen.
Re: mit lokalen mailserver mails speichern
vielen dank. die einstellung war port 25, jetzt kann ich mails verschicken.Du hast Dich mit dem IMAP-Server verbunden anstatt mit dem SMTP-Server. Das sollte je nach Einstellung Port 25, 465 oder 587 sein.
aber nu ist das nächste problem: ich kann keine mails empfangen.
mein mailserver hat folgende programme:
exim4
dovecot
procmail
fetchmail
also ich hab es soweit geschafft das fetchmail die mails holt und procmail die ins verzeichnis /var/mail/user ablegt. soweit so gut.
jetzt möchte ich eben mit meinem client rechner mit kmail die mails via imap holen. auf dovecot ist starttls eingestellt. server antwortet auch auf port 143. habe das auch bei kmail so eingestellt. wenn ich jetzt auf "nach emails sehen" drücke passiert nichts. mail.log sieht folgendermaßen aus:
Code: Alles auswählen
Jun 16 06:25:03 olaf exim4: ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly brokenJun 16 06:25:03 olaf exim4: ALERT: exim paniclog /var/log/ex
Jun 17 06:25:02 olaf exim4: ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken
Code: Alles auswählen
Jun 17 22:22:09 192 dovecot: imap(olaf): Disconnected: Logged out in=14246 out=109060
Jun 17 22:22:09 192 dovecot: imap(olaf): Disconnected: Logged out in=135 out=3385
Jun 17 22:22:14 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17678, TLS, session=<dapOcrwY4gDAqAEB>
Jun 17 22:22:23 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17680, TLS, session=<nfTacrwY4wDAqAEB>
Jun 17 22:22:59 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17682, TLS, session=<Icb5dLwY5ADAqAEB>
Jun 17 22:23:04 192 dovecot: imap(olaf): Connection closed in=103 out=631
Jun 17 22:23:07 192 dovecot: imap(olaf): Disconnected: Logged out in=314 out=2695
Jun 17 22:23:07 192 dovecot: imap(olaf): Disconnected: Logged out in=116 out=1258
Jun 17 22:23:12 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17686, TLS, session=<JybPdbwY5gDAqAEB>
Jun 17 22:23:17 192 fetchmail[3615]: 16 Nachrichten (16 gesehene) für user@gmx.net bei pop.gmx.net (384082 Bytes).
Jun 17 22:23:18 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17688, TLS, session=<Hz4gdrwY5wDAqAEB>
Re: mit lokalen mailserver mails speichern
Dabei kann ich Dir leider nicht helfen - habe Exim nie wirklich benutzt. Das ist aber auf jeden Fall unabhängig von Deinem geschilderten Problem.orbb hat geschrieben:also ich hab es soweit geschafft das fetchmail die mails holt und procmail die ins verzeichnis /var/mail/user ablegt. soweit so gut.
jetzt möchte ich eben mit meinem client rechner mit kmail die mails via imap holen. auf dovecot ist starttls eingestellt. server antwortet auch auf port 143. habe das auch bei kmail so eingestellt. wenn ich jetzt auf "nach emails sehen" drücke passiert nichts. mail.log sieht folgendermaßen aus:
Code: Alles auswählen
Jun 16 06:25:03 olaf exim4: ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly brokenJun 16 06:25:03 olaf exim4: ALERT: exim paniclog /var/log/ex Jun 17 06:25:02 olaf exim4: ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken
Ich habe Fetchmail schon lange nicht mehr benutzt, also hier mal eine freie Interpretation der Log-Zeile: Fetchmail sieht 16 Nachrichten die es schon kennt. Es gibt keine neuen Nachrichten, weshalb auch keine herunter geladen werden, und Du in Deinem Posteingang keine neuen Nachrichten siehst.orbb hat geschrieben: hier noch die vom server:
ich hab mich schon durchs ganze netz gelesen aber ich komme einfach nicht an die lösung. wieß da jemand was ich da falsch mache? wenn mehr infos gebraucht werden einfach schreiben. vielen dank schonmal im vorraus.Code: Alles auswählen
Jun 17 22:22:09 192 dovecot: imap(olaf): Disconnected: Logged out in=14246 out=109060 Jun 17 22:22:09 192 dovecot: imap(olaf): Disconnected: Logged out in=135 out=3385 Jun 17 22:22:14 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17678, TLS, session=<dapOcrwY4gDAqAEB> Jun 17 22:22:23 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17680, TLS, session=<nfTacrwY4wDAqAEB> Jun 17 22:22:59 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17682, TLS, session=<Icb5dLwY5ADAqAEB> Jun 17 22:23:04 192 dovecot: imap(olaf): Connection closed in=103 out=631 Jun 17 22:23:07 192 dovecot: imap(olaf): Disconnected: Logged out in=314 out=2695 Jun 17 22:23:07 192 dovecot: imap(olaf): Disconnected: Logged out in=116 out=1258 Jun 17 22:23:12 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17686, TLS, session=<JybPdbwY5gDAqAEB> Jun 17 22:23:17 192 fetchmail[3615]: 16 Nachrichten (16 gesehene) für user@gmx.net bei pop.gmx.net (384082 Bytes). Jun 17 22:23:18 192 dovecot: imap-login: Login: user=<olaf>, method=PLAIN, rip=192.168.1.1, lip=192.168.1.7, mpid=17688, TLS, session=<Hz4gdrwY5wDAqAEB>
Falls Du in Deinem Postfach überhaupt keine Nachrichten siehst, auf dem Server aber welche vorhanden sind, dann wäre es natürlich gut Deine Konfiguration zu kennen. Vielleicht speichert Procmail die E-Mails ja in einen anderen Ordner als den wo Dovecot danach sucht?
Re: mit lokalen mailserver mails speichern
Warum so kompliziert? Filterungen, wie das Procmail kann, mache ich bequem über MangeSieve in Dovecot.
Also wozu brauchst du Procmail?
Bei mir übergibt Fetchmail die Mails an Postfix (in deinem Fall Exim). Dazu sage ich Fetchmail sowas wie:
Postfix übergibt diese an Dovecot, wobei in Postfix ebenfalls die User mittels ihren gewünschten Emailadressen zugeordnet/ konfiguriert habe.
Das geht in Postfix über sowas wie:
Dovecot ordnet dort ein, was man unter
Zu Exim kann ich dir nichts sagen, da ich es nicht benutze, aber es sollte nach einem ähnlichen Prinzip funktionieren. Stichwort Aliase.
Also wozu brauchst du Procmail?
Bei mir übergibt Fetchmail die Mails an Postfix (in deinem Fall Exim). Dazu sage ich Fetchmail sowas wie:
Code: Alles auswählen
poll pop3.strato.de protocol pop3 user "maik@provider.de" there with password "123456" is "maik@meinserver" here
Das geht in Postfix über sowas wie:
Code: Alles auswählen
maik@provider.de maik@meinserver
als Pfad benutzt. In meinem Fallmail_location =
Code: Alles auswählen
mail_location = maildir:~/Maildir
Re: mit lokalen mailserver mails speichern
hier mal alles über dovecot von mit:
Code: Alles auswählen
cat 10-mail.conf
##
## Mailbox locations and namespaces
##
# Location for users' mailboxes. The default is empty, which means that Dovecot
# tries to find the mailboxes automatically. This won't work if the user
# doesn't yet have any mail, so you should explicitly tell Dovecot the full
# location.
#
# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
# isn't enough. You'll also need to tell Dovecot where the other mailboxes are
# kept. This is called the "root mail directory", and it must be the first
# path given in the mail_location setting.
#
# There are a few special variables you can use, eg.:
#
# %u - username
# %n - user part in user@domain, same as %u if there's no domain
# %d - domain part in user@domain, empty if there's no domain
# %h - home directory
#
# See doc/wiki/Variables.txt for full list. Some examples:
#
mail_location = maildir:~/Maildir
# mail_location = mbox:~/mail:INBOX=/var/mail/%u
# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
#
# <doc/wiki/MailLocation.txt>
#
mail_location = maildir:/home/%u/mail
# If you need to set multiple mailbox locations or want to change default
# namespace settings, you can do it by defining namespace sections.
#
# You can have private, shared and public namespaces. Private namespaces
# are for user's personal mails. Shared namespaces are for accessing other
# users' mailboxes that have been shared. Public namespaces are for shared
# mailboxes that are managed by sysadmin. If you create any shared or public
# namespaces you'll typically want to enable ACL plugin also, otherwise all
# users can access all the shared mailboxes, assuming they have permissions
# on filesystem level to do so.
namespace inbox {
# Namespace type: private, shared or public
#type = private
# Hierarchy separator to use. You should use the same separator for all
# namespaces or some clients get confused. '/' is usually a good one.
# The default however depends on the underlying mail storage format.
#separator =
# Prefix required to access this namespace. This needs to be different for
# all namespaces. For example "Public/".
#prefix =
# Physical location of the mailbox. This is in same format as
# mail_location, which is also the default for it.
#location =
# There can be only one INBOX, and this setting defines which namespace
# has it.
inbox = yes
# If namespace is hidden, it's not advertised to clients via NAMESPACE
# extension. You'll most likely also want to set list=no. This is mostly
# useful when converting from another server with different namespaces which
# you want to deprecate but still keep working. For example you can create
# hidden namespaces with prefixes "~/mail/", "~%u/mail/" and "mail/".
#hidden = no
# Show the mailboxes under this namespace with LIST command. This makes the
# namespace visible for clients that don't support NAMESPACE extension.
# "children" value lists child mailboxes, but hides the namespace prefix.
#list = yes
# Namespace handles its own subscriptions. If set to "no", the parent
# namespace handles them (empty prefix should always have this as "yes")
#subscriptions = yes
}
# Example shared namespace configuration
#namespace {
#type = shared
#separator = /
# Mailboxes are visible under "shared/user@domain/"
# %%n, %%d and %%u are expanded to the destination user.
#prefix = shared/%%u/
# Mail location for other users' mailboxes. Note that %variables and ~/
# expands to the logged in user's data. %%n, %%d, %%u and %%h expand to the
# destination user's data.
#location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
# Use the default namespace for saving subscriptions.
#subscriptions = no
# List the shared/ namespace only if there are visible shared mailboxes.
#list = children
#}
# Should shared INBOX be visible as "shared/user" or "shared/user/INBOX"?
#mail_shared_explicit_inbox = yes
# System user and group used to access mails. If you use multiple, userdb
# can override these by returning uid or gid fields. You can use either numbers
# or names. <doc/wiki/UserIds.txt>
#mail_uid =
#mail_gid =
# Group to enable temporarily for privileged operations. Currently this is
# used only with INBOX when either its initial creation or dotlocking fails.
# Typically this is set to "mail" to give access to /var/mail.
#mail_privileged_group =
# Grant access to these supplementary groups for mail processes. Typically
# these are used to set up access to shared mailboxes. Note that it may be
# dangerous to set these if users can create symlinks (e.g. if "mail" group is
# set here, ln -s /var/mail ~/mail/var could allow a user to delete others'
# mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it).
#mail_access_groups =
# Allow full filesystem access to clients. There's no access checks other than
# what the operating system does for the active UID/GID. It works with both
# maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/
# or ~user/.
#mail_full_filesystem_access = no
##
## Mail processes
##
# Don't use mmap() at all. This is required if you store indexes to shared
# filesystems (NFS or clustered filesystem).
#mmap_disable = no
# Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL
# since version 3, so this should be safe to use nowadays by default.
#dotlock_use_excl = yes
# When to use fsync() or fdatasync() calls:
# optimized (default): Whenever necessary to avoid losing important data
# always: Useful with e.g. NFS when write()s are delayed
# never: Never use it (best performance, but crashes can lose data)
#mail_fsync = optimized
# Mail storage exists in NFS. Set this to yes to make Dovecot flush NFS caches
# whenever needed. If you're using only a single mail server this isn't needed.
#mail_nfs_storage = no
# Mail index files also exist in NFS. Setting this to yes requires
# mmap_disable=yes and fsync_disable=no.
#mail_nfs_index = no
# Locking method for index files. Alternatives are fcntl, flock and dotlock.
# Dotlocking uses some tricks which may create more disk I/O than other locking
# methods. NFS users: flock doesn't work, remember to change mmap_disable.
#lock_method = fcntl
# Directory in which LDA/LMTP temporarily stores incoming mails >128 kB.
#mail_temp_dir = /tmp
# Valid UID range for users, defaults to 500 and above. This is mostly
# to make sure that users can't log in as daemons or other system users.
# Note that denying root logins is hardcoded to dovecot binary and can't
# be done even if first_valid_uid is set to 0.
#first_valid_uid = 500
#last_valid_uid = 0
# Valid GID range for users, defaults to non-root/wheel. Users having
# non-valid GID as primary group ID aren't allowed to log in. If user
# belongs to supplementary groups with non-valid GIDs, those groups are
# not set.
#first_valid_gid = 1
#last_valid_gid = 0
# Maximum allowed length for mail keyword name. It's only forced when trying
# to create new keywords.
#mail_max_keyword_length = 50
# ':' separated list of directories under which chrooting is allowed for mail
# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
# This setting doesn't affect login_chroot, mail_chroot or auth chroot
# settings. If this setting is empty, "/./" in home dirs are ignored.
# WARNING: Never add directories here which local users can modify, that
# may lead to root exploit. Usually this should be done only if you don't
# allow shell access for users. <doc/wiki/Chrooting.txt>
#valid_chroot_dirs =
# Default chroot directory for mail processes. This can be overridden for
# specific users in user database by giving /./ in user's home directory
# (eg. /home/./user chroots into /home). Note that usually there is no real
# need to do chrooting, Dovecot doesn't allow users to access files outside
# their mail directory anyway. If your home directories are prefixed with
# the chroot directory, append "/." to mail_chroot. <doc/wiki/Chrooting.txt>
#mail_chroot =
# UNIX socket path to master authentication server to find users.
# This is used by imap (for shared users) and lda.
#auth_socket_path = /var/run/dovecot/auth-userdb
# Directory where to look up mail plugins.
#mail_plugin_dir = /usr/lib/dovecot/modules
# Space separated list of plugins to load for all services. Plugins specific to
# IMAP, LDA, etc. are added to this list in their own .conf files.
#mail_plugins =
##
## Mailbox handling optimizations
##
# The minimum number of mails in a mailbox before updates are done to cache
# file. This allows optimizing Dovecot's behavior to do less disk writes at
# the cost of more disk reads.
#mail_cache_min_mail_count = 0
# When IDLE command is running, mailbox is checked once in a while to see if
# there are any new mails or other changes. This setting defines the minimum
# time to wait between those checks. Dovecot can also use dnotify, inotify and
# kqueue to find out immediately when changes occur.
#mailbox_idle_check_interval = 30 secs
# Save mails with CR+LF instead of plain LF. This makes sending those mails
# take less CPU, especially with sendfile() syscall with Linux and FreeBSD.
# But it also creates a bit more disk I/O which may just make it slower.
# Also note that if other software reads the mboxes/maildirs, they may handle
# the extra CRs wrong and cause problems.
#mail_save_crlf = no
# Max number of mails to keep open and prefetch to memory. This only works with
# some mailbox formats and/or operating systems.
#mail_prefetch_count = 0
# How often to scan for stale temporary files and delete them (0 = never).
# These should exist only after Dovecot dies in the middle of saving mails.
#mail_temp_scan_interval = 1w
##
## Maildir-specific settings
##
# By default LIST command returns all entries in maildir beginning with a dot.
# Enabling this option makes Dovecot return only entries which are directories.
# This is done by stat()ing each entry, so it causes more disk I/O.
# (For systems setting struct dirent->d_type, this check is free and it's
# done always regardless of this setting)
#maildir_stat_dirs = no
# When copying a message, do it with hard links whenever possible. This makes
# the performance much better, and it's unlikely to have any side effects.
#maildir_copy_with_hardlinks = yes
# Assume Dovecot is the only MUA accessing Maildir: Scan cur/ directory only
# when its mtime changes unexpectedly or when we can't find the mail otherwise.
#maildir_very_dirty_syncs = no
# If enabled, Dovecot doesn't use the S=<size> in the Maildir filenames for
# getting the mail's physical size, except when recalculating Maildir++ quota.
# This can be useful in systems where a lot of the Maildir filenames have a
# broken size. The performance hit for enabling this is very small.
#maildir_broken_filename_sizes = no
##
## mbox-specific settings
##
# Which locking methods to use for locking mbox. There are four available:
# dotlock: Create <mailbox>.lock file. This is the oldest and most NFS-safe
# solution. If you want to use /var/mail/ like directory, the users
# will need write access to that directory.
# dotlock_try: Same as dotlock, but if it fails because of permissions or
# because there isn't enough disk space, just skip it.
# fcntl : Use this if possible. Works with NFS too if lockd is used.
# flock : May not exist in all systems. Doesn't work with NFS.
# lockf : May not exist in all systems. Doesn't work with NFS.
#
# You can use multiple locking methods; if you do the order they're declared
# in is important to avoid deadlocks if other MTAs/MUAs are using multiple
# locking methods as well. Some operating systems don't allow using some of
# them simultaneously.
#mbox_read_locks = fcntl
#mbox_write_locks = dotlock fcntl
# Maximum time to wait for lock (all of them) before aborting.
#mbox_lock_timeout = 5 mins
# If dotlock exists but the mailbox isn't modified in any way, override the
# lock file after this much time.
#mbox_dotlock_change_timeout = 2 mins
# When mbox changes unexpectedly we have to fully read it to find out what
# changed. If the mbox is large this can take a long time. Since the change
# is usually just a newly appended mail, it'd be faster to simply read the
# new mails. If this setting is enabled, Dovecot does this but still safely
# fallbacks to re-reading the whole mbox file whenever something in mbox isn't
# how it's expected to be. The only real downside to this setting is that if
# some other MUA changes message flags, Dovecot doesn't notice it immediately.
# Note that a full sync is done with SELECT, EXAMINE, EXPUNGE and CHECK
# commands.
#mbox_dirty_syncs = yes
# Like mbox_dirty_syncs, but don't do full syncs even with SELECT, EXAMINE,
# EXPUNGE or CHECK commands. If this is set, mbox_dirty_syncs is ignored.
#mbox_very_dirty_syncs = no
# Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK
# commands and when closing the mailbox). This is especially useful for POP3
# where clients often delete all mails. The downside is that our changes
# aren't immediately visible to other MUAs.
#mbox_lazy_writes = yes
# If mbox size is smaller than this (e.g. 100k), don't write index files.
# If an index file already exists it's still read, just not updated.
#mbox_min_index_size = 0
# Mail header selection algorithm to use for MD5 POP3 UIDLs when
# pop3_uidl_format=%m. For backwards compatibility we use apop3d inspired
# algorithm, but it fails if the first Received: header isn't unique in all
# mails. An alternative algorithm is "all" that selects all headers.
#mbox_md5 = apop3d
##
## mdbox-specific settings
##
# Maximum dbox file size until it's rotated.
#mdbox_rotate_size = 2M
# Maximum dbox file age until it's rotated. Typically in days. Day begins
# from midnight, so 1d = today, 2d = yesterday, etc. 0 = check disabled.
#mdbox_rotate_interval = 0
# When creating new mdbox files, immediately preallocate their size to
# mdbox_rotate_size. This setting currently works only in Linux with some
# filesystems (ext4, xfs).
#mdbox_preallocate_space = no
##
## Mail attachments
##
# sdbox and mdbox support saving mail attachments to external files, which
# also allows single instance storage for them. Other backends don't support
# this for now.
# WARNING: This feature hasn't been tested much yet. Use at your own risk.
# Directory root where to store mail attachments. Disabled, if empty.
#mail_attachment_dir =
# Attachments smaller than this aren't saved externally. It's also possible to
# write a plugin to disable saving specific attachments externally.
#mail_attachment_min_size = 128k
# Filesystem backend to use for saving attachments:
# posix : No SiS done by Dovecot (but this might help FS's own deduplication)
# sis posix : SiS with immediate byte-by-byte comparison during saving
# sis-queue posix : SiS with delayed comparison and deduplication
#mail_attachment_fs = sis posix
# Hash format to use in attachment filenames. You can add any text and
# variables: %{md4}, %{md5}, %{sha1}, %{sha256}, %{sha512}, %{size}.
# Variables can be truncated, e.g. %{sha256:80} returns only first 80 bits
#mail_attachment_hash = %{sha1}
]
Code: Alles auswählen
cat 10-ssl.conf
##
## SSL settings
##
# SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
ssl = yes
# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
# dropping root privileges, so keep the key file unreadable by anyone but
# root. Included doc/mkcert.sh can be used to easily generate self-signed
# certificate, just make sure to update the domains in dovecot-openssl.cnf
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
# If key file is password protected, give the password here. Alternatively
# give it when starting dovecot with -p parameter. Since this file is often
# world-readable, you may want to place this setting instead to a different
# root owned 0600 file by using ssl_key_password = <path.
#ssl_key_password =
# PEM encoded trusted certificate authority. Set this only if you intend to use
# ssl_verify_client_cert=yes. The file should contain the CA certificate(s)
# followed by the matching CRL(s). (e.g. ssl_ca = </etc/ssl/certs/ca.pem)
#ssl_ca =
# Require that CRL check succeeds for client certificates.
#ssl_require_crl = yes
# Request client to send a certificate. If you also want to require it, set
# auth_ssl_require_client_cert=yes in auth section.
#ssl_verify_client_cert = no
# Which field from certificate to use for username. commonName and
# x500UniqueIdentifier are the usual choices. You'll also need to set
# auth_ssl_username_from_cert=yes.
#ssl_cert_username_field = commonName
# How often to regenerate the SSL parameters file. Generation is quite CPU
# intensive operation. The value is in hours, 0 disables regeneration
# entirely.
#ssl_parameters_regenerate = 168
# SSL protocols to use
#ssl_protocols = !SSLv2
# SSL ciphers to use
#ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL
# SSL crypto device to use, for valid values run "openssl engine"
#ssl_crypto_device =
Code: Alles auswählen
cat dovecot.conf
## Dovecot configuration file
# Protocols we want to be serving:
# imap pop3
protocols = imap pop3
# If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration
# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.
# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, put the
# value inside quotes, eg.: key = "# char and trailing whitespace "
# Default values are shown for each setting, it's not required to uncomment
# those. These are exceptions to this though: No sections (e.g. namespace {})
# or plugin settings are added by default, they're listed only as examples.
# Paths are also just examples with the real defaults being based on configure
# options. The paths listed here are for configure --prefix=/usr
# --sysconfdir=/etc --localstatedir=/var
# Enable installed protocols
!include_try /usr/share/dovecot/protocols.d/*.protocol
# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
listen = *
# Base directory where to store runtime data.
#base_dir = /var/run/dovecot/
# Name of this instance. In multi-instance setup doveadm and other commands
# can use -i <instance_name> to select which instance is used (an alternative
# to -c <config_path>). The instance name is also added to Dovecot processes
# in ps output.
#instance_name = dovecot
# Greeting message for clients.
#login_greeting = Dovecot ready.
# Space separated list of trusted network ranges. Connections from these
# IPs are allowed to override their IP addresses and ports (for logging and
# for authentication checks). disable_plaintext_auth is also ignored for
# these networks. Typically you'd specify your IMAP proxy servers here.
#login_trusted_networks =
# Sepace separated list of login access check sockets (e.g. tcpwrap)
#login_access_sockets =
# With proxy_maybe=yes if proxy destination matches any of these IPs, don't do
# proxying. This isn't necessary normally, but may be useful if the destination
# IP is e.g. a load balancer's IP.
#auth_proxy_self =
# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no
# Should all processes be killed when Dovecot master process shuts down.
# Setting this to "no" means that Dovecot can be upgraded without
# forcing existing client connections to close (although that could also be
# a problem if the upgrade is e.g. because of a security fix).
#shutdown_clients = yes
# If non-zero, run mail commands via this many connections to doveadm server,
# instead of running them directly in the same process.
#doveadm_worker_count = 0
# UNIX socket or host:port used for connecting to doveadm server
#doveadm_socket_path = doveadm-server
# Space separated list of environment variables that are preserved on Dovecot
# startup and passed down to all of its child processes. You can also give
# key=value pairs to always set specific settings.
#import_environment = TZ
##
## Dictionary server settings
##
# Dictionary can be used to store key=value lists. This is used by several
# plugins. The dictionary can be accessed either directly or though a
# dictionary server. The following dict block maps dictionary names to URIs
# when the server is used. These can then be referenced using URIs in format
# "proxy::<name>".
dict {
#quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
#expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}
# Most of the actual configuration gets included below. The filenames are
# first sorted by their ASCII value and parsed in that order. The 00-prefixes
# in filenames are intended to make it easier to understand the ordering.
!include conf.d/*.conf
# A config file can also tried to be included without giving an error if
# it's not found:
!include_try local.conf
Re: mit lokalen mailserver mails speichern
orbb hat geschrieben:also ich hab es soweit geschafft das fetchmail die mails holt und procmail die ins verzeichnis /var/mail/user ablegt. soweit so gut.
Fällt Dir was auf?orbb hat geschrieben:hier mal alles über dovecot von mit:
Code: Alles auswählen
mail_location = maildir:/home/%u/mail
PS: Um die aktuelle Konfiguration von Dovecot auszugeben ist der Befehl doveconf -n gedacht.

Re: mit lokalen mailserver mails speichern
ich glaube schon. wenn ich es recht verstehe dann leitet dovecot die clientsuche nach mails in das homeverzeichnis am server um. klar....da liegen keine mails sondern in var/mail/usr. das heisst ich muss bei "mail_location" den pfad dahin angeben. ist das so richtig?Code: Alles auswählen
mail_location = maildir:/home/%u/mail
Fällt Dir was auf?
PS: Um die aktuelle Konfiguration von Dovecot auszugeben ist der Befehl doveconf -n gedacht.
danke dir, hab ich wieder was gelernt.

Re: mit lokalen mailserver mails speichern
Ja, genau das meinte ich.orbb hat geschrieben:ich glaube schon. wenn ich es recht verstehe dann leitet dovecot die clientsuche nach mails in das homeverzeichnis am server um. klar....da liegen keine mails sondern in var/mail/usr. das heisst ich muss bei "mail_location" den pfad dahin angeben. ist das so richtig?Code: Alles auswählen
mail_location = maildir:/home/%u/mail
Fällt Dir was auf?
Sehr schön! Dafür ist das Forum ja da.orbb hat geschrieben:danke dir, hab ich wieder was gelernt.PS: Um die aktuelle Konfiguration von Dovecot auszugeben ist der Befehl doveconf -n gedacht.
Re: mit lokalen mailserver mails speichern
tja...nach etlichen rumprobieren und docs lesen komm ich immer noch nicht an meine mails....
ich nehme als mail client icedove her. wie schon gesagt mails verschicken klappt einwandfrei. wenn ich meine mails abrufen will kommt folgende meldung:
"Der aktuelle Vorgang in "Posteingang" ist fehlgeschlagen. Der server des Kontos "olaf@192.168.1.7" antwortete:
[CANNOT] Mailbox isn t an valid mboxfile."
ich bin langsam am verzweifeln, irgendwas hab ich wohl noch übersehen. am besten poste ich hier einfach mal meine confs:
fetchmail:
hier die von procmail:
kann mir jemand sagen was ich noch falsch mache? ich denke das wird doch nicht mehr soviel sein. hab jetzt etliche nächte damit verbracht aber ich komme einfach nicht drauf.
ich nehme als mail client icedove her. wie schon gesagt mails verschicken klappt einwandfrei. wenn ich meine mails abrufen will kommt folgende meldung:
"Der aktuelle Vorgang in "Posteingang" ist fehlgeschlagen. Der server des Kontos "olaf@192.168.1.7" antwortete:
[CANNOT] Mailbox isn t an valid mboxfile."
ich bin langsam am verzweifeln, irgendwas hab ich wohl noch übersehen. am besten poste ich hier einfach mal meine confs:
fetchmail:
Code: Alles auswählen
cat .fetchmailrc
poll pop.gmx.net
protocol pop3
user user@gmx.net
pass geheim
ssl
mda /usr/bin/procmail
die von exim4cat .procmailrc
MAILDIR=/var/spool/mail/olaf
LOGABSTRACT=all
LOGFILE=$HOME/procmail.log
# Mails vom Sender 'spam.com' werden in
# den Papierkorb verschoben
:0:
* ^From.*@spam.com
.trash
# Verschiebt Mails mit Inhalt „Werbung“ in den Papierkorb
:0:
* ^.*Werbung (ist nur ein test, wird noch erweitert)
.trash
# Mails an die E-Mail Adresse susi.schmuecker.
# privat verschoben, E-Mails an die Adresse ge
# werden ins Verzeichnis firma gelegt.
:0:
* ^To.*user@gmx.net
.trash
Code: Alles auswählen
cat update-exim4.conf.conf
# /etc/exim4/update-exim4.conf.conf
#
# Edit this file and /etc/mailname by hand and execute update-exim4.conf
# yourself or use 'dpkg-reconfigure exim4-config'
#
# Please note that this is _not_ a dpkg-conffile and that automatic changes
# to this file might happen. The code handling this will honor your local
# changes, so this is usually fine, but will break local schemes that mess
# around with multiple versions of the file.
#
# update-exim4.conf uses this file to determine variable values to generate
# exim configuration macros for the configuration file.
#
# Most settings found in here do have corresponding questions in the
# Debconf configuration, but not all of them.
#
# This is a Debian specific file
dc_eximconfig_configtype='smarthost'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1:192.168.1.7'
dc_readhost='medienserver.olafmedia.com'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets='192.168.1.0/24'
dc_smarthost='mail.gmx.net'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='false'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'
Re: mit lokalen mailserver mails speichern
Das ist eine Fehlermeldung von Dovecot, dass er mit der Datei nichts anfangen kann. Aber warum mbox? Ist das eine generische Fehlermeldung, oder hast Du von Maildir auf mbox umgestellt?orbb hat geschrieben:"Der aktuelle Vorgang in "Posteingang" ist fehlgeschlagen. Der server des Kontos "olaf@192.168.1.7" antwortete:
[CANNOT] Mailbox isn t an valid mboxfile."
Re: mit lokalen mailserver mails speichern
das kapiere ich jetzt nicht.....wie meist du umgestellt bzw. wo stellt man das denn um?Ist das eine generische Fehlermeldung, oder hast Du von Maildir auf mbox umgestellt?
Re: mit lokalen mailserver mails speichern
oki, soweit alles hinbekommen. jetzt bekomme ich nur bei procmail eine meldung, das procmail nicht in die procmail.log schreiben kann. habe die datei im homeverzeichnis mit den rechten 0666. warum kann procmail da nichts reinchschreiben?
hier mal der auszug aus der mail.log:
hier mal der auszug aus der mail.log:
Code: Alles auswählen
Jul 5 17:20:02 192 procmail[1584]: Error while writing to "/home/olaf/procmail.log"
Jul 5 17:35:02 192 procmail[1603]: Error while writing to "/home/olaf/procmail.log"
Re: mit lokalen mailserver mails speichern
hab alles hinbekommen. danke nochmals für eure hilfe.