1 (edited by deepakmvb 2018-08-01 17:10:47)

Topic: Connect to iRedMail through WebApplication

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi,

I have setup the iRedmail, now i have to connect it with the web application, How can i do this ?

Web-application is asking for:
    1) host name
    2) port Number
    3) SMTP encryption type :  ssl or tsl or none
    4) SMTP authentication mode : Login, Plain, None

How can i set it up,
Thanks in advance.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Connect to iRedMail through WebApplication

FYI: https://docs.iredmail.org/#mua

3 (edited by deepakmvb 2018-08-01 20:28:19)

Re: Connect to iRedMail through WebApplication

Thank you very much!!
I am the newbie in this, I gave the port number, host  but now I have to give username and password for SMTP, how can I set the username and password for each domain in my mail server?

4

Re: Connect to iRedMail through WebApplication

deepakmvb wrote:

how can I set the username and password for each domain in my mail server?

You can access https://<your-server>/iredadmin/ to manage mail accounts.

5

Re: Connect to iRedMail through WebApplication

Hi Zhang

Sorry I am asking many questions, but really i am out of clue!
Yeah I had created users and domains in admin panel, but in my webapplication i have to give smpt username and password to authenticate the user. But when i give the same by which i created inn admin panel its showing following error.

"Starting Swift_SmtpTransport !! Connection could not be established with host "

6

Re: Connect to iRedMail through WebApplication

deepakmvb wrote:

"Starting Swift_SmtpTransport !! Connection could not be established with host "

I don't know how your program works with smtp, but if you use correct server address, port (587), and secure connection (STARTTLS or TLS), correct username (full email) and password, it should works as expected.

7

Re: Connect to iRedMail through WebApplication

Hi Zhang,

I tried but its showing above error, username means the user which we enter in ireadmin right??

8

Re: Connect to iRedMail through WebApplication

And also if give port number 25 and without authentication its working fine but when i give 587 and try to give credentials and try its showing error

9

Re: Connect to iRedMail through WebApplication

Mind sharing the logs generated by /var/log/maillog (Linux) which are related to your issue?

10

Re: Connect to iRedMail through WebApplication

deepakmvb wrote:

And also if give port number 25 and without authentication its working fine but when i give 587 and try to give credentials and try its showing error

This is not expected. With default iRedMail configuration, you can only send through port 587 with STARTTLS (or TLS) secure connection, NOT port 25. So the question is: Did you modify any Postfix configuration? especially /etc/postfix/main.cf.

11 (edited by deepakmvb 2018-08-04 23:55:20)

Re: Connect to iRedMail through WebApplication

HI Zang,
in some video i saw so uncomented these lines , if i leave as default also it wont work
"#submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       y       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING "

12

Re: Connect to iRedMail through WebApplication

Here is my main.cf file


""
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       y       -       1       postscreen
smtpd     pass  -       -       y       -       -       smtpd
dnsblog   unix  -       -       y       -       0       dnsblog
tlsproxy  unix  -       -       y       -       0       tlsproxy
#submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       y       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       y       -       -       qmqpd
#smtp       inet  n       -       -       -       -       smtpd
pickup     unix  n       -       n       60      1       pickup
cleanup    unix  n       -       n       -       0       cleanup
#qmgr     unix  n       -       n       300     1       oqmgr
qmgr       unix  n       -       n       300     1       qmgr
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
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
relay      unix  -       -       n       -       -       smtp
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
#
# ====================================================================
# 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
#
scache     unix  -       -       n       -       1       scache
#
# ====================================================================
#
# 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 = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/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.
#
maildrop   unix  -       n       n       -       -       pipe flags=DRhu
    user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# Other external delivery methods.
#
uucp       unix  -       n       n       -       -       pipe flags=Fqhu
    user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
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/lib/bsmtp/bsmtp -t$nexthop -f$sender $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}
# Submission, port 587, force TLS connection.
submission inet n       -       n       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o content_filter=smtp-amavis:[127.0.0.1]:10026

# Use dovecot's `deliver` program as LDA.
dovecot unix    -       n       n       -       -      pipe
    flags=DRh user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${domain} -m ${extension}

# mlmmj - mailing list manager
# ${nexthop} is '%d/%u' in transport ('mlmmj:%d/%u')
mlmmj   unix  -       n       n       -       -       pipe
    flags=ORhu user=mlmmj:mlmmj argv=/usr/bin/mlmmj-amime-receive -L /var/vmail/mlmmj/${nexthop}

# Amavisd integration.
smtp-amavis unix -  -   n   -   2  smtp
    -o syslog_name=postfix/amavis
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
    -o max_use=20

127.0.0.1:10025 inet n  -   n   -   -  smtpd
    -o syslog_name=postfix/10025
    -o content_filter=
    -o mynetworks_style=host
    -o mynetworks=127.0.0.0/8
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o strict_rfc821_envelopes=yes
    -o smtp_tls_security_level=none
    -o smtpd_tls_security_level=none
    -o smtpd_restriction_classes=
    -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_end_of_data_restrictions=
    -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_header_body_checks,no_unknown_recipient_checks,no_address_mappings

13

Re: Connect to iRedMail through WebApplication

Hi wraptor, I am using Ubuntu 16.04,

Here is my mail.log file


"Aug  4 03:30:02 mail postfix/pickup[32141]: 99BB245A44: uid=0 from=<root>
Aug  4 03:30:02 mail postfix/cleanup[667]: 99BB245A44: message-id=<20180804033002.99BB245A44@mail.marketingleomail.ml>
Aug  4 03:30:02 mail postfix/qmgr[4404]: 99BB245A44: from=<root@mail.marketingleomail.ml>, size=1241, nrcpt=1 (queue active)
Aug  4 03:30:03 mail postfix/10025/smtpd[681]: connect from mail.marketingleomail.ml[127.0.0.1]
Aug  4 03:30:03 mail postfix/10025/smtpd[681]: 3FB5245A42: client=mail.marketingleomail.ml[127.0.0.1]
Aug  4 03:30:03 mail postfix/cleanup[667]: 3FB5245A42: message-id=<20180804033002.99BB245A44@mail.marketingleomail.ml>
Aug  4 03:30:03 mail postfix/qmgr[4404]: 3FB5245A42: from=<root@mail.marketingleomail.ml>, size=1784, nrcpt=1 (queue active)
Aug  4 03:30:03 mail postfix/10025/smtpd[681]: disconnect from mail.marketingleomail.ml[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Aug  4 03:30:03 mail amavis[2665]: (02665-01) Passed CLEAN {RelayedInbound}, [127.0.0.1] <root@mail.marketingleomail.ml> -> <root@mail.marketingleomail.ml>, Message-ID: <20180804033002.99BB245A44@mail.marketingleomail.ml>, mail_id: R5cWaIp0DbgW, Hits: 0, size: 1241, queued_as: 3FB5245A42, 490 ms, Tests: [NO_RELAYS=-0.001,TVD_SPACE_RATIO=0.001]
Aug  4 03:30:03 mail postfix/amavis/smtp[675]: 99BB245A44: to=<root@mail.marketingleomail.ml>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.74, delays=0.16/0.08/0.01/0.49, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 3FB5245A42)
Aug  4 03:30:03 mail postfix/qmgr[4404]: 99BB245A44: removed
Aug  4 03:30:03 mail postfix/cleanup[667]: 481A445A44: message-id=<20180804033002.99BB245A44@mail.marketingleomail.ml>
Aug  4 03:30:03 mail postfix/qmgr[4404]: 481A445A44: from=<root@mail.marketingleomail.ml>, size=1933, nrcpt=1 (queue active)
Aug  4 03:30:03 mail postfix/local[684]: 3FB5245A42: to=<root@mail.marketingleomail.ml>, relay=local, delay=0.04, delays=0.01/0.02/0/0.02, dsn=2.0.0, status=sent (forwarded as 481A445A44)
Aug  4 03:30:03 mail postfix/qmgr[4404]: 3FB5245A42: removed
Aug  4 03:30:03 mail postfix/pipe[686]: 481A445A44: to=<postmaster@marketingleomail.ml>, relay=dovecot, delay=0.12, delays=0/0.01/0/0.1, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug  4 03:30:03 mail postfix/qmgr[4404]: 481A445A44: removed
Aug  4 06:25:04 mail postfix/pickup[4967]: 7AD8245A42: uid=0 from=<root>
Aug  4 06:25:04 mail postfix/cleanup[5462]: 7AD8245A42: message-id=<20180804062504.7AD8245A42@mail.marketingleomail.ml>
Aug  4 06:25:04 mail postfix/qmgr[4404]: 7AD8245A42: from=<root@mail.marketingleomail.ml>, size=38225, nrcpt=1 (queue active)
Aug  4 06:25:06 mail postfix/10025/smtpd[5603]: connect from mail.marketingleomail.ml[127.0.0.1]
Aug  4 06:25:06 mail postfix/10025/smtpd[5603]: 4215445A44: client=mail.marketingleomail.ml[127.0.0.1]
Aug  4 06:25:06 mail postfix/cleanup[5462]: 4215445A44: message-id=<20180804062504.7AD8245A42@mail.marketingleomail.ml>
Aug  4 06:25:06 mail postfix/qmgr[4404]: 4215445A44: from=<root@mail.marketingleomail.ml>, size=38768, nrcpt=1 (queue active)
Aug  4 06:25:06 mail postfix/10025/smtpd[5603]: disconnect from mail.marketingleomail.ml[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Aug  4 06:25:06 mail amavis[2666]: (02666-01) Passed CLEAN {RelayedInbound}, [127.0.0.1] <root@mail.marketingleomail.ml> -> <root@mail.marketingleomail.ml>, Message-ID: <20180804062504.7AD8245A42@mail.marketingleomail.ml>, mail_id: FLJUhg1Vl15z, Hits: -0.001, size: 38217, queued_as: 4215445A44, 1744 ms, Tests: [NO_RELAYS=-0.001]
Aug  4 06:25:06 mail postfix/amavis/smtp[5479]: 7AD8245A42: to=<root@mail.marketingleomail.ml>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.5, delays=1.7/0.01/0.01/1.7, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4215445A44)
Aug  4 06:25:06 mail postfix/qmgr[4404]: 7AD8245A42: removed
Aug  4 06:25:06 mail postfix/cleanup[5462]: 4A20745A42: message-id=<20180804062504.7AD8245A42@mail.marketingleomail.ml>
Aug  4 06:25:06 mail postfix/qmgr[4404]: 4A20745A42: from=<root@mail.marketingleomail.ml>, size=38917, nrcpt=1 (queue active)
Aug  4 06:25:06 mail postfix/local[5604]: 4215445A44: to=<root@mail.marketingleomail.ml>, relay=local, delay=0.04, delays=0.01/0.02/0/0.02, dsn=2.0.0, status=sent (forwarded as 4A20745A42)
Aug  4 06:25:06 mail postfix/qmgr[4404]: 4215445A44: removed
Aug  4 06:25:06 mail postfix/pipe[5606]: 4A20745A42: to=<postmaster@marketingleomail.ml>, relay=dovecot, delay=0.06, delays=0/0.01/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug  4 06:25:06 mail postfix/qmgr[4404]: 4A20745A42: removed
Aug  4 06:29:11 mail postfix/postscreen[5755]: CONNECT from [141.212.122.208]:52243 to [172.31.5.74]:25
Aug  4 06:29:11 mail postfix/postscreen[5755]: cache btree:/var/lib/postfix/postscreen_cache full cleanup: retained=3 dropped=0 entries
Aug  4 06:29:15 mail postfix/postscreen[5755]: HANGUP after 4.7 from [141.212.122.208]:52243 in tests before SMTP handshake
Aug  4 06:29:15 mail postfix/postscreen[5755]: DISCONNECT [141.212.122.208]:52243
Aug  4 07:01:58 mail amavis[7137]: starting. /usr/sbin/amavisd-new at mail.marketingleomail.ml amavisd-new-2.10.1 (20141025), Unicode aware, LC_ALL="C", LANG="en_US.UTF-8"
Aug  4 07:01:58 mail amavis[7145]: Net::Server: Group Not Defined.  Defaulting to EGID '124 124'
Aug  4 07:01:58 mail amavis[7145]: Net::Server: User Not Defined.  Defaulting to EUID '118'
Aug  4 07:01:58 mail amavis[7145]: Module Amavis::Conf        2.404
Aug  4 07:01:58 mail amavis[7145]: Module Archive::Zip        1.56
Aug  4 07:01:58 mail amavis[7145]: Module Compress::Raw::Zlib 2.068
Aug  4 07:01:58 mail amavis[7145]: Module Compress::Zlib      2.068
Aug  4 07:01:58 mail amavis[7145]: Module Crypt::OpenSSL::RSA 0.28
Aug  4 07:01:58 mail amavis[7145]: Module DBD::mysql          4.033
Aug  4 07:01:58 mail amavis[7145]: Module DBI                 1.634
Aug  4 07:01:58 mail amavis[7145]: Module DB_File             1.835
Aug  4 07:01:58 mail amavis[7145]: Module Digest::MD5         2.54
Aug  4 07:01:58 mail amavis[7145]: Module Digest::SHA         5.95
Aug  4 07:01:58 mail amavis[7145]: Module Encode              2.72
Aug  4 07:01:58 mail amavis[7145]: Module File::Temp          0.2304
Aug  4 07:01:58 mail amavis[7145]: Module IO::Socket::INET6   2.72
Aug  4 07:01:58 mail amavis[7145]: Module IO::Socket::IP      0.37
Aug  4 07:01:58 mail amavis[7145]: Module MIME::Entity        5.507
Aug  4 07:01:58 mail amavis[7145]: Module MIME::Parser        5.507
Aug  4 07:01:58 mail amavis[7145]: Module MIME::Tools         5.507
Aug  4 07:01:58 mail amavis[7145]: Module Mail::DKIM::Signer  0.4
Aug  4 07:01:58 mail amavis[7145]: Module Mail::DKIM::Verifier 0.4
Aug  4 07:01:58 mail amavis[7145]: Module Mail::Header        2.13
Aug  4 07:01:58 mail amavis[7145]: Module Mail::Internet      2.13
Aug  4 07:01:58 mail amavis[7145]: Module Mail::SPF           v2.009
Aug  4 07:01:58 mail amavis[7145]: Module Mail::SpamAssassin  3.004001
Aug  4 07:01:58 mail amavis[7145]: Module Net::DNS            0.81
Aug  4 07:01:58 mail amavis[7145]: Module Net::LibIDN         0.12
Aug  4 07:01:58 mail amavis[7145]: Module Net::Server         2.008
Aug  4 07:01:58 mail amavis[7145]: Module NetAddr::IP         4.078
Aug  4 07:01:58 mail amavis[7145]: Module Scalar::Util        1.41
Aug  4 07:01:58 mail amavis[7145]: Module Socket              2.018
Aug  4 07:01:58 mail amavis[7145]: Module Socket6             0.25
Aug  4 07:01:58 mail amavis[7145]: Module Time::HiRes         1.9726
Aug  4 07:01:58 mail amavis[7145]: Module URI                 1.71
Aug  4 07:01:58 mail amavis[7145]: Module Unix::Syslog        1.1
Aug  4 07:01:58 mail amavis[7145]: Amavis::ZMQ code     NOT loaded
Aug  4 07:01:58 mail amavis[7145]: Amavis::DB code      NOT loaded
Aug  4 07:01:58 mail amavis[7145]: SQL base code        loaded
Aug  4 07:01:58 mail amavis[7145]: SQL::Log code        loaded
Aug  4 07:01:58 mail amavis[7145]: SQL::Quarantine      loaded
Aug  4 07:01:58 mail amavis[7145]: Lookup::SQL code     loaded
Aug  4 07:01:58 mail amavis[7145]: Lookup::LDAP code    NOT loaded
Aug  4 07:01:58 mail amavis[7145]: AM.PDP-in proto code loaded
Aug  4 07:01:58 mail amavis[7145]: SMTP-in proto code   loaded
Aug  4 07:01:58 mail amavis[7145]: Courier proto code   NOT loaded
Aug  4 07:01:58 mail amavis[7145]: SMTP-out proto code  loaded
Aug  4 07:01:58 mail amavis[7145]: Pipe-out proto code  NOT loaded
Aug  4 07:01:58 mail amavis[7145]: BSMTP-out proto code NOT loaded
Aug  4 07:01:58 mail amavis[7145]: Local-out proto code NOT loaded
Aug  4 07:01:58 mail amavis[7145]: OS_Fingerprint code  NOT loaded
Aug  4 07:01:58 mail amavis[7145]: ANTI-VIRUS code      loaded
Aug  4 07:01:58 mail amavis[7145]: ANTI-SPAM code       loaded
Aug  4 07:01:58 mail amavis[7145]: ANTI-SPAM-EXT code   NOT loaded
Aug  4 07:01:58 mail amavis[7145]: ANTI-SPAM-C code     NOT loaded
Aug  4 07:01:58 mail amavis[7145]: ANTI-SPAM-SA code    loaded
Aug  4 07:01:58 mail amavis[7145]: Unpackers code       loaded
Aug  4 07:01:58 mail amavis[7145]: DKIM code            loaded
Aug  4 07:01:58 mail amavis[7145]: Tools code           NOT loaded
Aug  4 07:01:58 mail amavis[7145]: Found $file            at /usr/bin/file
Aug  4 07:01:58 mail amavis[7145]: Found $altermime       at /usr/bin/altermime
Aug  4 07:01:58 mail amavis[7145]: Internal decoder for .mail
Aug  4 07:01:58 mail amavis[7145]: No ext program for   .F, tried: unfreeze, freeze -d, melt, fcat
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .Z    at /bin/uncompress
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .gz   at /bin/gzip -d
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .bz2  at /bin/bzip2 -d
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .xz   at /usr/bin/xz -dc
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .lzma at /usr/bin/xz -dc --format=lzma
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .lrz  at /usr/bin/lrzip -q -k -d -o -
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .lzo  at /usr/bin/lzop -d
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .lz4  at /usr/bin/lz4c -d
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .rpm  at /usr/bin/rpm2cpio
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .cpio at /bin/pax
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .tar  at /bin/pax
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .deb  at /usr/bin/ar
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .rar  at /usr/bin/unrar
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .arj  at /usr/bin/arj
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .arc  at /usr/bin/nomarch
Aug  4 07:01:58 mail amavis[7145]: No ext program for   .zoo, tried: zoo, unzoo
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .cab  at /usr/bin/cabextract
Aug  4 07:01:58 mail amavis[7145]: Internal decoder for .tnef
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .zip  at /usr/bin/7za
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .kmz  at /usr/bin/7za
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .7z   at /usr/bin/7za
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .jar  at /usr/bin/7z
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .swf  at /usr/bin/7z
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .lha  at /usr/bin/7z
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .iso  at /usr/bin/7z
Aug  4 07:01:58 mail amavis[7145]: Found decoder for    .exe  at /usr/bin/unrar; /usr/bin/arj
Aug  4 07:01:58 mail amavis[7145]: No decoder for       .F
Aug  4 07:01:58 mail amavis[7145]: No decoder for       .zoo
Aug  4 07:01:58 mail amavis[7145]: Using primary internal av scanner code for clamav-socket
Aug  4 07:01:58 mail amavis[7145]: Found secondary av scanner clamav-clamscan at /usr/bin/clamscan
Aug  4 14:54:30 mail postfix/postscreen[19085]: CONNECT from [41.212.69.205]:56466 to [172.31.5.74]:25
Aug  4 14:54:30 mail postfix/postscreen[19085]: HANGUP after 0 from [41.212.69.205]:56466 in tests before SMTP handshake
Aug  4 14:54:30 mail postfix/postscreen[19085]: DISCONNECT [41.212.69.205]:56466
Aug  4 14:54:30 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.4
Aug  4 14:54:30 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.11
Aug  4 14:54:30 mail postfix/dnsblog[19086]: addr 41.212.69.205 listed by domain b.barracudacentral.org as 127.0.0.2
Aug  4 14:54:30 mail postfix/postscreen[19085]: CONNECT from [41.212.69.205]:56493 to [172.31.5.74]:25
Aug  4 14:54:30 mail postfix/dnsblog[19086]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.11
Aug  4 14:54:30 mail postfix/dnsblog[19086]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.4
Aug  4 14:54:30 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain b.barracudacentral.org as 127.0.0.2
Aug  4 14:54:36 mail postfix/postscreen[19085]: DNSBL rank 5 for [41.212.69.205]:56493
Aug  4 14:54:36 mail postfix/postscreen[19085]: DISCONNECT [41.212.69.205]:56493
Aug  4 14:54:37 mail postfix/postscreen[19085]: CONNECT from [41.212.69.205]:57168 to [172.31.5.74]:25
Aug  4 14:54:37 mail postfix/dnsblog[19086]: addr 41.212.69.205 listed by domain b.barracudacentral.org as 127.0.0.2
Aug  4 14:54:37 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.4
Aug  4 14:54:37 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.11
Aug  4 14:54:43 mail postfix/postscreen[19085]: DNSBL rank 5 for [41.212.69.205]:57168
Aug  4 14:54:43 mail postfix/postscreen[19085]: DISCONNECT [41.212.69.205]:57168
Aug  4 14:54:44 mail postfix/postscreen[19085]: CONNECT from [41.212.69.205]:57461 to [172.31.5.74]:25
Aug  4 14:54:44 mail postfix/dnsblog[19086]: addr 41.212.69.205 listed by domain b.barracudacentral.org as 127.0.0.2
Aug  4 14:54:44 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.11
Aug  4 14:54:44 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.4
Aug  4 14:54:50 mail postfix/postscreen[19085]: DNSBL rank 5 for [41.212.69.205]:57461
Aug  4 14:54:50 mail postfix/postscreen[19085]: DISCONNECT [41.212.69.205]:57461
Aug  4 14:54:50 mail postfix/postscreen[19085]: CONNECT from [41.212.69.205]:57651 to [172.31.5.74]:25
Aug  4 14:54:50 mail postfix/dnsblog[19086]: addr 41.212.69.205 listed by domain b.barracudacentral.org as 127.0.0.2
Aug  4 14:54:50 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.4
Aug  4 14:54:50 mail postfix/dnsblog[19087]: addr 41.212.69.205 listed by domain zen.spamhaus.org as 127.0.0.11
Aug  4 14:54:56 mail postfix/postscreen[19085]: DNSBL rank 5 for [41.212.69.205]:57651
Aug  4 14:54:56 mail postfix/postscreen[19085]: DISCONNECT [41.212.69.205]:57651
"

14

Re: Connect to iRedMail through WebApplication

deepakmvb wrote:

in some video i saw so uncomented these lines , if i leave as default also it wont work

Please revert all your changes made to Postfix, just use default iRedMail settings.

15

Re: Connect to iRedMail through WebApplication

Ok, I will try reverting the main.cf and try again.

16

Re: Connect to iRedMail through WebApplication

Hi Zhang,

I reverted everything in main.cf, but now also if try to connect mail server using the smtp its showing failed in my application, and also its not showing any error in mail.log fail where I can see the errors for this particular issue.

17

Re: Connect to iRedMail through WebApplication

1: check your webapplication log file.
2: if your webapplication connected to smtp service, there must be some log related to this connection. So, check Postfix log file (/var/log/maillog) on your iRedMail server.

What's the smtp settings used by your webapplication? Show us a screenshot of the smtp setting page.

18 (edited by deepakmvb 2018-08-08 16:49:10)

Re: Connect to iRedMail through WebApplication

Hi Zhang

Sorry for late reply, here is the screen shot (attached) of my application regarding smtp settings.

I reinstalled iRedMail in fresh instance, but still its not working.
After filling here if itry to send a mail through port 587, i am getting this error

"Aug  8 08:20:11 mail postfix/anvil[6730]: statistics: max connection rate 1/60s for (smtpd:13.229.180.88) at Aug  8 08:15:17
Aug  8 08:20:11 mail postfix/anvil[6730]: statistics: max connection count 1 for (smtpd:13.229.180.88) at Aug  8 08:15:17
Aug  8 08:20:11 mail postfix/anvil[6730]: statistics: max cache size 1 at Aug  8 08:15:17"


And I am using Amazon e2 instance to host iRedmail, is there any changes needs to be done there ??

Post's attachments

Sketch.png
Sketch.png 208.07 kb, 1 downloads since 2018-08-08 

You don't have the permssions to download the attachments of this post.

19

Re: Connect to iRedMail through WebApplication

1: "Host" should be IP address or hostname of your iRedMail server. If you use hostname, it must point to the mail server address in DNS.
2: "SMTP encryption type" must be "TLS" or "STARTTLS".
3: "Port": 587
4: "SMTP authentication mode", i don't know what options it offers, but you must provide smtp login username (full email address) and password. Usually the mode name is "login" or "password".

20

Re: Connect to iRedMail through WebApplication

Hello Zhang,

Yeah Tried with the same credentials, But it's not getting authenticated. Is there anything that I have to change in main.cf or any other file??

21

Re: Connect to iRedMail through WebApplication

No change required, iRedMail offers smtp authentication on port 587 with STARTTLS (or TLS) secure connection out of box.

During testing, you should check Postfix log file, is there any error? What's the log? extract it and paste here so that others can help troubleshoot.

22

Re: Connect to iRedMail through WebApplication

Hello Zhang
This is my log file

23

Re: Connect to iRedMail through WebApplication

Aug 10 08:38:06 mail postfix/10025/smtpd[3502]: connect from mail.marketingleomail.ml[127.0.0.1]
Aug 10 08:38:06 mail postfix/10025/smtpd[3502]: 70B3445804: client=mail.marketingleomail.ml[127.0.0.1]
Aug 10 08:38:06 mail postfix/cleanup[3493]: 70B3445804: message-id=<8c741d34fc8d67e0d4cad3faab94cb5e@app.marketingleo.com>
Aug 10 08:38:06 mail postfix/qmgr[2540]: 70B3445804: from=<deepak@marketingleomail.ml>, size=10164, nrcpt=1 (queue active)
Aug 10 08:38:06 mail postfix/10025/smtpd[3502]: disconnect from mail.marketingleomail.ml[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Aug 10 08:38:06 mail amavis[2773]: (02773-02) Passed CLEAN {RelayedInbound}, [172.31.18.54]:44494 <deepak@marketingleomail.ml> -> <deepakmvb@gmail.com>, Queue-ID: CEB0B45801, Message-ID: <8c741d34fc8d67e0d4cad3faab94cb5e@app.marketingleo.com>, mail_id: 0fmRp9Es6afK, Hits: -0.273, size: 9641, queued_as: 70B3445804, 594 ms, Tests: [ALL_TRUSTED=-1,HTML_MESSAGE=0.001,MIME_HTML_MOSTLY=0.001,MPART_ALT_DIFF=0.724,URIBL_BLOCKED=0.001]
Aug 10 08:38:06 mail postfix/amavis/smtp[3498]: CEB0B45801: to=<deepakmvb@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.66, delays=0.04/0.02/0/0.6, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 70B3445804)
Aug 10 08:38:06 mail postfix/qmgr[2540]: CEB0B45801: removed
Aug 10 08:38:06 mail postfix/smtp[3503]: Trusted TLS connection established to gmail-smtp-in.l.google.com[172.217.194.26]:25: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Aug 10 08:38:07 mail postfix/smtp[3503]: 70B3445804: to=<deepakmvb@gmail.com>, relay=gmail-smtp-in.l.google.com[172.217.194.26]:25, delay=1.5, delays=0.01/0.02/0.66/0.84, dsn=2.0.0, status=sent (250 2.0.0 OK 1533890287 y92-v6si7404245plb.378 - gsmtp)
Aug 10 08:38:07 mail postfix/qmgr[2540]: 70B3445804: removed
Aug 10 08:39:28 mail postfix/postscreen[3458]: CONNECT from [172.31.18.54]:44498 to [172.31.14.20]:25
Aug 10 08:39:28 mail postfix/postscreen[3458]: WHITELISTED [172.31.18.54]:44498
Aug 10 08:39:28 mail postfix/smtpd[3459]: connect from ip-172-31-18-54.ap-southeast-1.compute.internal[172.31.18.54]
Aug 10 08:39:28 mail postfix/smtpd[3459]: C310745801: client=ip-172-31-18-54.ap-southeast-1.compute.internal[172.31.18.54]
Aug 10 08:39:28 mail postfix/cleanup[3493]: C310745801: message-id=<9f6bd0bff87dc9093fedfba7c81b5d8d@app.marketingleo.com>
Aug 10 08:39:28 mail postfix/qmgr[2540]: C310745801: from=<deepak@marketingleomail.ml>, size=9641, nrcpt=1 (queue active)
Aug 10 08:39:28 mail postfix/smtpd[3459]: disconnect from ip-172-31-18-54.ap-southeast-1.compute.internal[172.31.18.54] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Aug 10 08:39:29 mail postfix/10025/smtpd[3502]: connect from mail.marketingleomail.ml[127.0.0.1]
Aug 10 08:39:29 mail postfix/10025/smtpd[3502]: AF93C45804: client=mail.marketingleomail.ml[127.0.0.1]
Aug 10 08:39:29 mail postfix/cleanup[3493]: AF93C45804: message-id=<9f6bd0bff87dc9093fedfba7c81b5d8d@app.marketingleo.com>
Aug 10 08:39:29 mail postfix/qmgr[2540]: AF93C45804: from=<deepak@marketingleomail.ml>, size=10164, nrcpt=1 (queue active)
Aug 10 08:39:29 mail postfix/10025/smtpd[3502]: disconnect from mail.marketingleomail.ml[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Aug 10 08:39:29 mail amavis[2772]: (02772-03) Passed CLEAN {RelayedInbound}, [172.31.18.54]:44498 <deepak@marketingleomail.ml> -> <deepakmvb@gmail.com>, Queue-ID: C310745801, Message-ID: <9f6bd0bff87dc9093fedfba7c81b5d8d@app.marketingleo.com>, mail_id: B_55scfHn1WQ, Hits: -0.273, size: 9641, queued_as: AF93C45804, 922 ms, Tests: [ALL_TRUSTED=-1,HTML_MESSAGE=0.001,MIME_HTML_MOSTLY=0.001,MPART_ALT_DIFF=0.724,URIBL_BLOCKED=0.001]
Aug 10 08:39:29 mail postfix/amavis/smtp[3498]: C310745801: to=<deepakmvb@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.96, delays=0.03/0/0/0.93, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as AF93C45804)
Aug 10 08:39:29 mail postfix/qmgr[2540]: C310745801: removed
Aug 10 08:39:30 mail postfix/smtp[3503]: Trusted TLS connection established to gmail-smtp-in.l.google.com[172.217.194.26]:25: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Aug 10 08:39:30 mail postfix/smtp[3503]: AF93C45804: to=<deepakmvb@gmail.com>, relay=gmail-smtp-in.l.google.com[172.217.194.26]:25, delay=1.1, delays=0/0.01/0.65/0.4, dsn=2.0.0, status=sent (250 2.0.0 OK 1533890370 g15-v6si7565389plo.284 - gsmtp)
Aug 10 08:39:30 mail postfix/qmgr[2540]: AF93C45804: removed
Aug 10 09:10:23 mail postfix/postscreen[4445]: CONNECT from [195.154.61.206]:38607 to [172.31.14.20]:25
Aug 10 09:10:23 mail postfix/dnsblog[4447]: addr 195.154.61.206 listed by domain zen.spamhaus.org as 127.0.0.4
Aug 10 09:10:23 mail postfix/postscreen[4445]: PREGREET 16 after 0.24 from [195.154.61.206]:38607: EHLO onyphe.io\r\n
Aug 10 09:10:23 mail postfix/postscreen[4445]: DISCONNECT [195.154.61.206]:38607

24

Re: Connect to iRedMail through WebApplication

ON port number 25 it works fine, but not on 587.

25

Re: Connect to iRedMail through WebApplication

I want to repeat the solution:

- Revert back all your changes made to Postfix
- Configure your web application to use correct server address, port (587), and secure connection (STARTTLS or TLS), correct username (full email) and password, it should works as expected. Port 25 is used to receive emails from other servers, not used by end users to submit email for sending.

We need Postfix log related to your testing (with port 587), pasted log in previous reply doesn't contain this info.