amavis, postfix (multiple instances) und ispconfig3

jan7007

Member
good evening,

i have a fresh installed debian jessie with the latest ispconfig 3.1b1.
Everything worked fine with postfix and amavis. Then i set up a second postfix instance with through this tutorials:

Code:
http://linuxpoison.blogspot.de/2008/02/howto-make-two-instance-of-postfix.html
https://lists.debian.org/debian-user-german/2012/09/msg00244.html

In the main postfix /etc/postfix/main.cf i changed
Code:
inet_interfaces = all
to
Code:
inet_interface = 127.0.0.1
and also added
Code:
alternate_config_directories = /etc/postfix-second

for the second postfix instance (/etc/postfix-second/main.cf) i changed:
Code:
myhostname = mail.MyRealDomainHere.net
inet_interfaces = xx.xxx.31.124

and added:
Code:
queue_directory = /var/spool/postfix-second
data_directory = /var/lib/postfix-second

smtp_bind_address = xx.xxx.31.124
syslog_name = postfix-second

my /etc/hosts:
Code:
127.0.0.1  localhost.localdomain localhost
xx.xxx.31.124  mail.myRealDomainHere.net mail

telnet localhost 10024
Code:
Trying ::1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 [::1] ESMTP amavisd-new service ready



but if i receive or send:
THE RESULT IS:

Code:
May 23 22:55:59 delta amavis[30519]: (!)DENIED ACCESS from IP xx.xxx.31.124, policy bank ''
May 23 22:55:59 delta postfix-second/smtp[29618]: 26CBB5E1DC8: to=<info@myRealDomainHere.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.27, delays=0.27/0/0/0, dsn=4.4.2, status=deferred (lost connection with 127.0.0.1[127.0.0.1] while receiving the initial server greeting)

After Reading
Code:
https://groups.google.com/forum/#!topic/mailing.unix.amavis-user/TJ8PZ4o9G6I
and
http://www.iredmail.org/forum/topic2377-iredmail-support-using-specific-ip-for-outgoing-mail.html

i changed /etc/amavis/conf.d/50-user :

Code:
@inet_acl = qw( 127.0.0.1 xx.xxx.31.124 [::1] );
$inet_socket_bind = undef;


Above mentioned 'Denied Access' Message from Amavis disappeard now but THE NEW RESULT IS:


Code:
May 23 23:54:43 delta amavis[76556]: (76556-01) (!)1mvlLgLxs8Dj FWD from <mySender@gmail.com> -> <info@myRealDomainHere.net>,  451 4.5.0 From MTA() during fwd-connect (All attempts (1) failed connecting to smtp:*:*): id=76556-01
May 23 23:54:43 delta amavis[76556]: (76556-01) Blocked MTA-BLOCKED {TempFailedOpenRelay}, [209.85.214.46]:38051 [209.85.214.46] <mySender@gmail.com> -> <info@myRealDomainHere.net>, Queue-ID: 93D2F5E1DD2, Message-ID: <CAD5TPY-7Y7SNiYmhnr2_LvB27i54kc7X7GVheoXAJGforbUiaA@mail.gmail.com>, mail_id: 1nvlLgLxs8Dj, Hits: 0.131, size: 2461, dkim_sd=20120113:gmail.com, 316 ms
May 23 23:54:43 delta postfix-second/smtp[76672]: 93D2F5E0DD2: to=<info@myRealDomainHere.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=1006, delays=1005/0.04/0.01/0.31, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=76556-01 - Temporary MTA failure on relaying, From MTA() during fwd-connect (All attempts (1) failed connecting to smtp:*:*): id=76556-01 (in reply to end of DATA command))
May 23 23:54:43 delta amavis[76555]: (76555-02) (!)connect to *:* failed, attempt #1: Can't connect to socket *:* using module IO::Socket::IP: Connection refused


I dont know what else to do. Trying to sort this out for 2 days now. Still not working.
I really need the multiple postfix instances for sending emails from specific IP's.
I would also accept to deactive Amavis but i tried to Stop the service and comment the lines
Code:
#content_filter = amavis:[127.0.0.1]:10024
#receive_override_options = no_address_mappings
in the main.cf . But it doesnt help.

Thanks for every Answer !
Jan
 

Till

Administrator
Und warum installierst Du bitte eine 2. Postfix instanz auf einem setup das für eine postfix instanz ausgelegt ist und auch mit einer Instanz funktioniert?
 

jan7007

Member
Wie gesagt, da ich mehrere Postfix Instanzen benötigte. Bekomme ich es also mit ispconfig nicht zusammen zum laufen oder wo liegt der Fehler ?
Kann ich amavis komplett
Deaktivieren ?
 

Till

Administrator
Wie gesagt, da ich mehrere Postfix Instanzen benötigte. Bekomme ich es also mit ispconfig nicht zusammen zum laufen oder wo liegt der Fehler ?

Kann ich Dir nicht sage da ich es nch nie benötigt habe und da Du uns nicht sagen willst warum Du es machst können wir Dir nicht sagen ob es eine bessre Lösung gibt ;)


Klar, kannst Du. wenn Du weder Spam, noch Antiviris noch Dkim Mail Signierun benötigst:

http://www.faqforge.com/linux/contr...ilter-and-antivirus-functions-in-ispconfig-3/
 

jan7007

Member
Ich habe doch in meinem post geschrieben, dass ich mehrere Instanzen benötige da ich von spezifischen Ips Mails versenden möchte ?

Auf dem Server sollen mehrere
Domains laufen und jede Domain soll über deren Ip Adresse die Emails per Postfix versenden. Meines Wissens geht dies nur mit mehreren Postfix Instanzen welche dann an das jeweilige Interface gebunden sind.
 
Zuletzt bearbeitet:

jan7007

Member
@Till: super, danke. funktioniert !!

einziges problem, in den logs taucht nun auf:

Code:
Jun 12 19:39:12 delta postfix/proxymap[60536]: warning: table "mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf": empty lookup result for: "info@----absender-email----.net" -- ignored
 

Till

Administrator
Das ist dich kein Fehler sondern eine information dass er keinen automatischen outgoing BCC macht da er keinen machen soll.
 

jan7007

Member
@Till ich muss das thema noch mal hochholen.

Nach längerer Abwesenheit stehe ich immer noch vor dem gleichen Problem.

ich habe nun gemäß deines tipps mit einer instanz versucht die restlichen ips zu konfigurieren:

/etc/postfix/master.cf:
Code:
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
#smtp      inet  n       -       -       -       -       smtpd

127.0.0.1:smtp inet  n     -       -       -       -       smtpd
      -o syslog_name=postfix-localhost
      -o smtp_helo_name=localhost
      -o smtp_bind_address=127.0.0.1
      -o myhostname=localhost

80.1xx.xxx.xx:smtp inet  n     -       -       -       -       smtpd
      -o syslog_name=postfix-af
      -o smtp_helo_name=mail.xxxxxyz.de
      -o smtp_bind_address=80.1xx.xxx.xx
      -o myhostname=mail.xxxxxyz.de

62.xxx.xx.xxx:smtp inet  n     -       -       -       -       smtpd
      -o syslog_name=postfix-s-f
      -o smtp_helo_name=mail.xxxxx123.net
      -o smtp_bind_address=62.xxx.xx.xxx
      -o myhostname=mail.xxxxxxx123.net

af-out  unix -  -  -  -  -  smtp
  -o smtp_bind_address=80.1xx.xxx.xx
  -o smtp_helo_name=mail.xxxxxxyz.de
  -o syslog_name=postfix-mail.xxxxxxxyz.de


s-f-out  unix -  -  -  -  -  smtp
  -o smtp_bind_address=62.xxx.xx.xxx
  -o smtp_helo_name=mail.xxxxxx123.net
  -o syslog_name=postfix-mail.xxxxxx123.net


Der Empfang und Versand von EMails funktioniert, jedoch wird beim Versand immer die Haupt IP des Servers (eth0) benutzt.
Die o.g. IP's welche eigentlichlich als Absender fungieren sollen, werden gänzlich ignoriert. Ich bin mit meinem Latein absolut am Ende.

viele grüße
Jan
 

jan7007

Member
habe ich getan, alle in der master.cf eingerichteten ips/absender domains benutzen jedoch weiterhin noch die eth0 ip des servers
(welche im übrigen überhaupt nicht in der master.cf eingerichtet ist)
 

florian030

Well-Known Member
Hast Du smtp_bind_address evtl. mehrfach in der main.cf kofiguriert?
Note 1: when inet_interfaces specifies no more than one IPv4 address, and that address is a non-loopback address, it is automatically used as the smtp_bind_address. This supports virtual IP hosting, but can be a problem on multi-homed firewalls. See the inet_interfaces documentation for more detail.
 

florian030

Well-Known Member
Das hat mit ISPConfig nichts zu tun.
inet_interfaces (default: all)
On a multi-homed firewall with separate Postfix instances listening on the "inside" and "outside" interfaces, this can prevent each instance from being able to reach remote SMTP servers on the "other side" of the firewall. Setting smtp_bind_address to 0.0.0.0 avoids the potential problem for IPv4, and setting smtp_bind_address6 to :: solves the problem for IPv6.
smtp_bind_address (default: empty)
Note 1: when inet_interfaces specifies no more than one IPv4 address, and that address is a non-loopback address, it is automatically used as the smtp_bind_address. This supports virtual IP hosting, but can be a problem on multi-homed firewalls. See the inet_interfaces documentation for more detail.
 

Werbung

Top