Hallo Debianer,
ich betreibe einen Debian-Server (Wheezy) und möchte per Client und IMAP Protokoll verschlüsselt mein Postfach synchronisieren.
Bisher greife ich nur per Webmailer (Squirrelmail) zu.
Der Email Empfang & Versand per Webmailer funktioniert soweit.
Wenn ich meine Kontoeinstellungen im Email-IMAP-Client (Android) vornehme, dann kann ich die Emails bereits abrufen.
Dies geschieht über TCP Port 465.
Wenn ich jedoch dann die Daten für den ausgehenden Server (über TCP Port 993) zum Versenden der Mail eintragen möchte, bricht der Email-Client ab. Es konnte keine richtige Verbindung oder keine Verschlüsselung eingerichtet werden.
In meinem Server-LOG erhalte ich dann diese Fehlermeldung:
Nov 24 15:29:55 h2475775 sm-mta[15408]: tAOESp9J015408: [178.32.252.35] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Man findet unter dieser Fehlermeldung diverse Einträge im Netz, aber bisher war für mich nichts brauchbares dabei. Angeblich würde nach einem Verbindungsaufbau vom Client nichts mehr zurückkommen.
Ich deute es so, dass Client und Server beim Datenaustausch wohl jeweils andere Daten vom Gegenüber erwarten !?
Ich verwende Dovecot als IMAP-Dienst und Sendmail als Mail-Service.
Könnt Ihr den Fehler erkennen ? Oder welche weiteren Config-Files sind relevant und soll ich hier noch posten ?
Grundsätzlich hab ich nach jeder Änderung die jeweilge Datei (Sendmail + Access) per make neukompiliert und den Sendmail-Dienst durchgestartet.
Danke im Voraus und Grüße,
Raphael
----------------------------------------------------------------
Anbei meine /etc/mail/sendmail.mc:
divert(-1)dnl
#-----------------------------------------------------------------------------
# $Sendmail: debproto.mc,v 8.14.4 2013-02-11 11:12:33 cowboy Exp $
#
# Copyright (c) 1998-2010 Richard Nelson. All Rights Reserved.
#
# cf/debian/sendmail.mc. Generated from sendmail.mc.in by configure.
#
# sendmail.mc prototype config file for building Sendmail 8.14.4
#
# Note: the .in file supports 8.7.6 - 9.0.0, but the generated
# file is customized to the version noted above.
#
# This file is used to configure Sendmail for use with Debian systems.
#
# If you modify this file, you will have to regenerate /etc/mail/sendmail.cf
# by running this file through the m4 preprocessor via one of the following:
# * make (or make -C /etc/mail)
# * sendmailconfig
# * m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# The first two options are preferred as they will also update other files
# that depend upon the contents of this file.
#
# The best documentation for this .mc file is:
# /usr/share/doc/sendmail-doc/cf.README.gz
#
#-----------------------------------------------------------------------------
divert(0)dnl
#
# Copyright (c) 1998-2005 Richard Nelson. All Rights Reserved.
#
# This file is used to configure Sendmail for use with Debian systems.
#
define(`_USE_ETC_MAIL_')dnl
include(`/etc/mail/tls/starttls.m4')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.14.4-4 2013-02-11 11:12:33 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
define(`confCACERT_PATH',`/etc/ssl/certs')
define(`confCACERT',`/etc/ssl/certs/thawte_im.pem')
define(`confSERVER_CERT',`/etc/ssl/certs/thawte_cert.pem')
define(`confSERVER_KEY',`/etc/ssl/private/www.XXXXXXXXXX.key')
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
undefine(`confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS=
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
dnl #
dnl # General defines
dnl #
dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
dnl # into this directory before writing files.
dnl # If *all* your user accounts are under /home then use that
dnl # instead - it will prevent any writes outside of /home !
dnl # define(`confSAFE_FILE_ENV', `')dnl
dnl #
dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
dnl # Remove `, Addr=' clauses to receive from any interface
dnl # If you want to support IPv6, switch the commented/uncommentd lines
dnl #
FEATURE(`no_default_msa')dnl
dnl # DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl # DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
dnl #
dnl # Define connection throttling and window length
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
dnl #
dnl # Features
dnl #
dnl # use /etc/mail/local-host-names
FEATURE(`use_cw_file')dnl
dnl #
dnl # The access db is the basis for most of sendmail's checking
# FEATURE(`access_db', , `skip')dnl
dnl #
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
# bis hierher
dnl # The greet_pause feature stops some automail bots - but check the
dnl # provided access db for details on excluding localhosts...
dnl # FEATURE(`greet_pause', `1000')dnl 1 seconds
dnl #
dnl # Delay_checks allows sender<->recipient checking
FEATURE(`delay_checks', `friend', `n')dnl
dnl #
dnl # If we get too many bad recipients, slow things down...
define(`confBAD_RCPT_THROTTLE',`3')dnl
dnl #
dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
dnl #
dnl # If you're on a dialup link, you should enable this - so sendmail
dnl # will not bring up the link (it will queue mail for later)
dnl define(`confCON_EXPENSIVE',`True')dnl
dnl #
dnl # Dialup/LAN connection overrides
dnl #
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
dnl #
FEATURE(`genericstable')dnl
GENERICS_DOMAIN(`XXXXXXXX.stratoserver.net')dnl
FEATURE(`use_cw_file')dnl
define(`confAUTH_OPTIONS', `A p y')dnl
dnl Accept PLAIN and LOGIN authentications.
dnl
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')
dnl Define paths to directory hosting certs of trusted certificate
dnl authorities (like VeriSign) and path to local certificate.
dnl
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
DAEMON_OPTIONS(`Name=TLSMTA,Port=smtps')
DAEMON_OPTIONS(`Name=MTA')
# Ab hier ergaenzt von Raphael fuer Spamassasin
# INPUT_MAIL_FILTER(`spamassassin', `S=unix:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
# define(`confMILTER_MACROS_CONNECT',`t, b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl
# define(`confMILTER_MACROS_HELO',`s, {tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}')dnl
# Ab hier ergaenzt von Raphael fuer ClamAV
INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav/clamav-milter.ctl, F=, T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `clamav')
=============================================================================
Anbei noch den Inhalt der /etc/access
# /etc/mail/access
# Copyright (c) 1998,2004 Richard Nelson <cowboy@debian.org>.
# Time-stamp: <1998/10/27 10:00:00 cowboy>
# GPL'd config file, please feed any gripes, suggestions, etc. to me
#
# Function:
# Access Control for this smtp server - determines:
# * Who we accept mail from
# * Who we accept relaying from
# * Who we will not send to
#
# Usage:
# FEATURE(access_db[, type [-o] /etc/mail/access])dnl
# makemap hash access < access
#
# Format:
# lhs:
# email addr <user@[host.domain]>
# domain name unless FEATURE(relay_hosts_only) is used,
# then this is a fqdn - and relay-domains ($=R)
# must also be fqdns.
# network number must end on an octet boundary, or
# you're stuck going the longwinded way ;-{
# rhs:
# OK accept mail even if other rules in the
# running ruleset would reject it.
# RELAY Allow domain to relay through your SMTP
# server. RELAY also serves an implicit
# OK for the other checks.
# REJECT reject the sender/recipient with a general
# purpose message that can be customized.
# confREJECT_MSG [550 Access denied] will be issued
# DISCARD discard the message completely using
# the $#discard mailer.
# ### any text where ### is an RFC 821 compliant error code
# and "any text" is a message to return for
# the command
# Examples:
# spammer@aol.com REJECT
# FREE.STEALTH.MAILER@ 550 Spam not accepted
#
# Notes:
# With FEATURE(blacklist_recipients) this is also possible:
# badlocaluser 550 Mailbox disabled for this username
# host.mydomain.com 550 That host does not accept mail
# user@otherhost.mydomain.com 550 Mailbox disabled for this recipient
#
# Related:
# define(`confREJECT_MSG', `550 Access denied')dnl
# define(`confCR_FILE', `-o /etc/mail/relay-domains')dnl <<- $=R
# FEATURE(relay_hosts_only)dnl
# FEATURE(relay_entire_domain)dnl <<- relays any host in the $=m class
# FEATURE(relay_based_on_MX)dnl <<- relaying for boxes MX'd to you
# FEATURE(blacklist_recipients)dnl
# FEATURE(rbl[,alternate server])dnl
# FEATURE(orbs[,alternate server])dnl <<- Debian addition
# FEATURE(orca[,alternate server])dnl <<- Debian addition
# FEATURE(accept_unqualified_senders)dnl
# FEATURE(accept_unresolvable_domains)dnl
#
# Local addresses 10.x.x.x, 127.x.x.x, 172.16-31.x.x 192.168.x.x can relay
# Note Well! You *must* make sure these address can't be spoofed externally
# Note, outbound relaying is controlled by connection and/or auth
# If you're not firewalled, and you don't have a lan, comment these out
# If you're not firewalled, and you have a lan, get firewalled *NOW*
# GreetPause - delay to check for spammers
# Client Connection rate (and #) control
Connect:localhost RELAY
GreetPause:localhost 0
ClientRate:localhost 0
ClientConn:localhost 0
#Connect:10 RELAY
#GreetPause:10 0
#ClientRate:10 0
#ClientConn:10 0
Connect:127 RELAY
GreetPause:127 0
ClientRate:127 0
ClientConn:127 0
Connect:IPv6:::1 RELAY
GreetPause:IPv6:::1 0
ClientRate:IPv6:::1 0
ClientConn:IPv6:::1 0
#Connect:172.16 RELAY
#Connect:172.17 RELAY
#Connect:172.18 RELAY
#Connect:172.19 RELAY
#Connect:172.20 RELAY
#Connect:172.21 RELAY
#Connect:172.22 RELAY
#Connect:172.23 RELAY
#Connect:172.24 RELAY
#Connect:172.25 RELAY
#Connect:172.26 RELAY
#Connect:172.27 RELAY
#Connect:172.28 RELAY
#Connect:172.29 RELAY
#Connect:172.30 RELAY
#Connect:172.31 RELAY
#Connect:192.168 RELAY
#GreetPause:192.168 0
#ClientRate:192.168 0
#ClientConn:192.168 0
# Defaults
GreetPause: 10
ClientRate: 10
ClientConn: 10
#
# Don't offer AUTH on local network
#SRV_Features:192.168.1 A
#
# Hosts with to allow relaying
#
#
# Hosts that validly forward to me
#GreetPause:<ip> 0
#ClientRate:<ip> 30
#ClientConn:<ip> 0
#
# Whitelisted users
#
Spam:postmaster@ FRIEND
Spam:abuse@ FRIEND
Spam:spam@ FRIEND
#
# Blacklisted users
#
#Connect:rampellsoft.com 554 Email directly, not through didtheyreadit.com
reject@ REJECT
#cyberpromo.com REJECT
#From:MAILER-DAEMON@store2.netvisao.pt REJECT
#
# Block invalid IPs
#
#Connect:0 REJECT whilst invalid, this also blocks sendmail -bs -Am
Connect:169.254 REJECT
Connect:192.0.2 REJECT
Connect:224 REJECT
Connect:255 REJECT
# Ab hier Raphael
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
# TLS_Clt: ENCR:128
IMAP Zugriff auf Debian Wheezy
-
- Beiträge: 49
- Registriert: 19.02.2006 00:13:41
- Wohnort: Karlsruhe
Re: IMAP Zugriff auf Debian Wheezy
993 ist traditionell der verschlüsselte IMAP-Port. IMAP ist aber kein Protokoll zum Senden/für ausgehende Mails, der Job läuft nach wie vor über SMTP – gerne auch verschlüsselt, aber nicht auf Port 993.Wenn ich jedoch dann die Daten für den ausgehenden Server (über TCP Port 993) zum Versenden der Mail eintragen möchte […]
Allgemein solltest du a) dringend daran arbeiten, deine Beiträge lesbar zu gestalten (kurze Logs/Configs/etc. in Code-Tags, längere nach NoPaste) und b) einen anderen MTA als sendmail in Erwägung ziehen.
-
- Beiträge: 49
- Registriert: 19.02.2006 00:13:41
- Wohnort: Karlsruhe
Re: IMAP Zugriff auf Debian Wheezy
hi!
ok, bzgl. dem Port 993 habe ich mich vertan, sorry, ich meine konkret SMTPS.
Bzgl. "a)" seh ich auch Verbesserungspotential und will mich bessern ... aber bzgl. dem MTA hatte ich gehofft "sendmail" behalten zu können. Der grundlegende Empfang und Versand von Mails per Webmailer funktioniert ja.
Ich vermute, dass in einem meiner geposteten Configs nur 1 oder 2 Statements falsch sind oder fehlen .. aber komm da grad nicht weiter.
Eine Idee ?
Danke und Grüße,
Raphael
ok, bzgl. dem Port 993 habe ich mich vertan, sorry, ich meine konkret SMTPS.
Bzgl. "a)" seh ich auch Verbesserungspotential und will mich bessern ... aber bzgl. dem MTA hatte ich gehofft "sendmail" behalten zu können. Der grundlegende Empfang und Versand von Mails per Webmailer funktioniert ja.
Ich vermute, dass in einem meiner geposteten Configs nur 1 oder 2 Statements falsch sind oder fehlen .. aber komm da grad nicht weiter.
Eine Idee ?
Danke und Grüße,
Raphael
-
- Beiträge: 49
- Registriert: 19.02.2006 00:13:41
- Wohnort: Karlsruhe
Re: IMAP Zugriff auf Debian Wheezy
Hallo!
hat jemand noch eine Idee ?
Wie kann ich unterstützen ? Welche weiteren Infos sind Euch hilfreich und kann ich noch zur Verfügung stellen ?
Hat jemand ggfs. eine ähnliche Anforderung und funktionierende Config, die man mal sehen darf ?
Danke und Grüße,
Raphael
hat jemand noch eine Idee ?
Wie kann ich unterstützen ? Welche weiteren Infos sind Euch hilfreich und kann ich noch zur Verfügung stellen ?
Hat jemand ggfs. eine ähnliche Anforderung und funktionierende Config, die man mal sehen darf ?
Danke und Grüße,
Raphael
Re: IMAP Zugriff auf Debian Wheezy
Das Problem ist eher, dass kaum noch jemand sendmail für den praktischen Einsatz hernimmt und dementsprechend keine große Aussicht darauf besteht, hier jemanden zu finden, der sich damit auskennt. Deswegen meine Anregung, einen der heutzutage üblicherweise verwendeten MTA herzunehmen.