ubuntuusers.de

Postfix E-Mail Verzeichnis

Status: Gelöst | Ubuntu-Version: Kein Ubuntu
Antworten |

BuZeMaNn

Anmeldungsdatum:
16. Juni 2015

Beiträge: Zähle...

Hallo Zusammen,

im Zuge meines Wahlpflichtfaches an der Schule habe ich mich ein wenig mit Linux bekannt gemacht und auch einen E-Mailserver mit Dovecot und Postfix eingerichtet.

Der Server an sich läuft und ich kann E-Mails schicken und diese gesendeten E-Mails in Squirrelmail einsehen (im gesendet Ordner).

Das Problem was ich allerdings habe ist, dass die durch Postfix die E-Mail in das jeweilige Home-Verzeichnis eines Users geschoben wird, ich diese allerdings gerne im /var/vmail/[Domain]/[USER]/mail haben möchte. Ich habe bereits gegoogled allerdings keine funktionierende Lösung gefunden.

Könnt ihr mir evtl. weiter helfen?

Danke im Voraus für eure Geduld mit mir. ☺

Gruß

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

Hallo und willkommen bei ubuntuusers,

um Dir weiterhelfen zu können, zeigst Du uns am besten erst einmal, wie Deine Konfiguration aktuell aussieht.

BuZeMaNn

(Themenstarter)

Anmeldungsdatum:
16. Juni 2015

Beiträge: 8

Hi und danke.

Reicht nur die Master.cf und Main.cf oder benötigst du weitere Konfigdateien und wie kann ich die am besten Anzeigen? Rauskopieren, oder gibt es dafür einen Befehl?

Tut mir leid, dass ich so blöd fragen muss aber in der Hinsicht bin ich leider noch kein Experte.

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

master.cf und die Ausgabe von postconf -n.

BuZeMaNn

(Themenstarter)

Anmeldungsdatum:
16. Juni 2015

Beiträge: 8

Master.cf

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#amavis    unix  -       -       n       -       4       smtp
#  -o smtp_data_done_timeout=1200
#  -o smtp_send_xforward_command=yes
#  -o disable_dns_lookups=yes
#  -o max_use=20
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy

#submission inet n       -       -       -       -       smtpd -v
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=may
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o smtpd_sasl_security_options=noanonymous
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_sasl_auth_enable=yes
#submission inet n       -       n       -       -       smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=no
#  -o smtpd_sasl_auth_enable=yes
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes
#  -o smtpd_tls_wrappermode=yes
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o milter_macro_daemon_name=ORIGINATING
#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
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
                              

Postconf -n

alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
canonical_maps = hash:/etc/postfix/canonical
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
defer_transports =
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
home_mailbox = Maildir/
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_protocols = all
local_recipient_maps = $virtual_mailbox_maps
mail_spool_directory = /var/mail
mailbox_command =
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 = Linux-Hommen.de
mynetworks = all
myorigin = Linux-Hommen
newaliases_path = /usr/bin/newaliases
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_clientcerts =
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_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
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_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_received_header = no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
virtual_alias_domains = hash:/etc/postfix/virtual

BuZeMaNn

(Themenstarter)

Anmeldungsdatum:
16. Juni 2015

Beiträge: 8

#push

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

Mit home_mailbox teilst Du dem local-Transport mit, die E-Mails im Homeverzeichnis des Benutzers abzulegen. Du willst, denke ich, eher mail_spool_directory verwenden.

Wenn Du Dovecot verwendest, kannst Du die E-Mails aber genauso gut auch an den übergeben und die komplette Einsortierung Dovecot überlassen. Das macht unter anderem Dinge wie Sieve, etc. leichter zu konfigurieren.

BuZeMaNn

(Themenstarter)

Anmeldungsdatum:
16. Juni 2015

Beiträge: 8

Also ich möchte es schon gerne so haben, dass er mir für jede E-Mail eine Datei erstellt, wie es mit Maildir der fall ist. Mit dem Mailspool directory würde er mir ja nur eine Datei erstellen als Spool, in welcher alle E-Mail "aufgelistet" sind.

Kann ich den Pfad von diesem local transport nicht ändern?

Wenn ich das ganze mit Dovecot einrichte, dass die E-Mails durch Dovecot versendet werden, wie würde das grob einzustellen sein?

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

BuZeMaNn schrieb:

Also ich möchte es schon gerne so haben, dass er mir für jede E-Mail eine Datei erstellt, wie es mit Maildir der fall ist. Mit dem Mailspool directory würde er mir ja nur eine Datei erstellen als Spool, in welcher alle E-Mail "aufgelistet" sind.

Nein, nicht zwingend:

Specify a name ending in / for maildir-style delivery.

BuZeMaNn

(Themenstarter)

Anmeldungsdatum:
16. Juni 2015

Beiträge: 8

Also ich habe nun versucht alles so einzustellen, dass die E-Mails via Dovecot versendet werden, allerdings ohne Erfolg.

Wenn ich nach dem Senden einer E-Mail service postfix status mache, zeigt er mir an, dass die E-Mail zur Mailbox gesendet wurde. Bei einem service dovecot status wird mir dann angezeigt, dass ich neue Post in /var/mail/adrian habe, wo die E-Mail nun auch als spool liegt.

Anbei die Master.conf und postconf -n

Master

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#amavis    unix  -       -       n       -       4       smtp
#  -o smtp_data_done_timeout=1200
#  -o smtp_send_xforward_command=yes
#  -o disable_dns_lookups=yes
#  -o max_use=20
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy

#submission inet n       -       -       -       -       smtpd -v
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=may
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o smtpd_sasl_security_options=noanonymous
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_sasl_auth_enable=yes
#submission inet n       -       n       -       -       smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=no
#  -o smtpd_sasl_auth_enable=yes
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes
#  -o smtpd_tls_wrappermode=yes
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o milter_macro_daemon_name=ORIGINATING
#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
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
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
#localhost:10025 inet   n       -       n       -       -       smtpd
#  -o content_filter=
#  -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 smtpd_restriction_classes=
#  -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_unknown_recipient_checks,no_header_body_checks,no_address_mappings
#  -o local_header_rewrite_clients=
#  -o local_recipient_maps=
#  -o relay_recipient_maps=
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}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
#  mailbox_transport = lmtp:inet:localhost
#  virtual_transport = vmail
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# Old example of delivery via Cyrus.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#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/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
#
#procmail  unix  -       n       n       -       -       pipe
#  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
#
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}

Postconf -n

alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
canonical_maps = hash:/etc/postfix/canonical
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
defer_transports =
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
dovecot_destination_recipient_limit = 1
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_protocols = all
local_recipient_maps = $virtual_mailbox_maps
mail_spool_directory = /var/mail
mailbox_command =
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 = Linux-Hommen.de
mynetworks = all
myorigin = Linux-Hommen
newaliases_path = /usr/bin/newaliases
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_clientcerts =
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_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
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_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_received_header = no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_transport = dovecot

sebix Team-Icon

Moderator, Webteam

Anmeldungsdatum:
14. April 2009

Beiträge: 5582

Wenn du nun die Zustellung ueber dovecot handeln laesst, musst du auch dovecot mitteilen, dass es Maildir verwenden soll: Dovecot Docs: MailLocation Maildir

Antworten |