1 (edited by good4xp 2016-04-08 13:50:31)

Topic: Sogo cannot send message: (smtp) originator not accepted

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  0.9.4 (update manualy from 0.8.7)
- Linux/BSD distribution name and version: Centos6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hello, I have issue with Sogo deploy.
Now Sogo (web) can receive emails, but cannot send any letter. Fail with "cannot send message: (smtp) originator not accepted" error.
When i use roundecube it works fine.
I installed sogo after take update to 0.9.4 version.

MY sogo.conf
    WOPort = 127.0.0.1:20000;
    WOWorkersCount = 10;
    SOGoProfileURL = "mysql://user:password@127.0.0.1:3306/sogo/sogo_user_profile";
    OCSFolderInfoURL = "mysql://user:password@127.0.0.1:3306/sogo/sogo_folder_info";
    OCSSessionsFolderURL = "mysql://user:password@127.0.0.1:3306/sogo/sogo_sessions_folder";
    OCSEMailAlarmsFolderURL = "mysql://user:password@127.0.0.1:3306/sogo/sogo_alarms_folder";
    SOGoLanguage = English;
    SOGoLoginModule = Mail;
    SOGoForceExternalLoginWithEmail = YES;
    SOGoMailCustomFromEnabled = YES;
    SOGoEnableEMailAlarms = YES;
    SOGoSMTPServer = 127.0.0.1;
    SOGoMailingMechanism = smtp;
    SOGoTimeZone = "America/New_York";
    SOGoFirstDayOfWeek = 1;
    SOGoRefreshViewCheck = every_5_minutes;
    SOGoMailReplyPlacement = below;
    SOGoAppointmentSendEMailNotifications = YES;
    SOGoFoldersSendEMailNotifications = YES;
    SOGoACLsSendEMailNotifications = YES;
    SOGoPasswordChangeEnabled = YES;
    SOGoUserSources = (
        {
            type = sql;
            id = vmail_mailbox;
            viewURL = "mysql://user:password@127.0.0.1:3306/sogo/users";
            canAuthenticate = YES;
            userPasswordAlgorithm = ssha;
            prependPasswordScheme = YES;
        },
    );

----

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

2

Re: Sogo cannot send message: (smtp) originator not accepted

good4xp wrote:

    SOGoSMTPServer = 127.0.0.1:587;

As far as i know, SOGo doesn't support SMTP over TLS or SSL, so please try again without ':587' in SOGoSMTPServer.

Search "SOGoSMTPServer" and "SOGoSMTPAuthenticationType" in SOGo installation guide please:
http://sogo.nu/support/index.html#/documentation

3 (edited by good4xp 2016-04-07 22:36:02)

Re: Sogo cannot send message: (smtp) originator not accepted

Thanks for reply.

Ohh.. I forgot to remove this line.
There was this error, when I set "SOGoSMTPServer = 127.0.0.1"

"Cannot send message: all recipients are invalid."

cat /etc/postfix/main.cf
...
smtpd_tls_security_level = may
...


ps I saw your post on sogo support when googled this problem  : )

4

Re: Sogo cannot send message: (smtp) originator not accepted

Excuse me, what's your issue now? Why you should the Postfix setting (smtpd_tls_security_level=may)?

good4xp wrote:

"Cannot send message: all recipients are invalid."

You don't have setting "viewURL = " in "SOGoUserSource = {}" in sogo.conf. Please check our sample config file:
https://bitbucket.org/zhb/iredmail/src/ … o.conf-179

5 (edited by good4xp 2016-04-08 13:51:21)

Re: Sogo cannot send message: (smtp) originator not accepted

ZhangHuangbin wrote:

Excuse me, what's your issue now?

Same error: "Cannot send message: all recipients are invalid." , but with roundcube ok fine.

Why you should the Postfix setting (smtpd_tls_security_level=may)?

I didn't touch that option. 

good4xp wrote:

"Cannot send message: all recipients are invalid."

You don't have setting "viewURL = " in "SOGoUserSource = {}" in sogo.conf. Please check our sample config file:
https://bitbucket.org/zhb/iredmail/src/ … o.conf-179

I  updated config at the first post to the current. Same error.

6

Re: Sogo cannot send message: (smtp) originator not accepted

good4xp wrote:

I  updated config at the first post to the current. Same error.

*) Do you have SQL table "sogo.users"? How did you create it? Show us the SQL structure please.
*) Any related error in /var/log/sogo/sogo.log?

7

Re: Sogo cannot send message: (smtp) originator not accepted

1.
Create with script
CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, domain) AS SELECT username, username, password, name, username, domain FROM vmail.mailbox WHERE active=1;

Structure:
>describe users;
+------------+--------------+------+-----+---------+-------+
| Field      | Type         | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| c_uid      | varchar(255) | NO   |     |         |       |
| c_name     | varchar(255) | NO   |     |         |       |
| c_password | varchar(255) | NO   |     |         |       |
| c_cn       | varchar(255) | NO   |     |         |       |
| mail       | varchar(255) | NO   |     |         |       |
| domain     | varchar(255) | NO   |     |         |       |
+------------+--------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

2) Apr 09 01:58:39 sogod [27772]: <0x0x7f6083281ab8[SOGoMailer]> error with recipient 'test_user@external_domain.com'
Apr 09 01:58:39 sogod [27772]: x.x.x.x "POST /SOGo/so/my_user@my_domain.com/Mail/0/folderDrafts/newDraft1460181467-1/send HTTP/1.1" 200 84/199 0.269 - - 0

----Few debug logs
C: connect to <0x0x777779afa48[NGInternetSocketAddress]: host=127.0.0.1 not-filled>
S: <SMTP-Reply: code=220 line='my_mail_server.com ESMTP Postfix'>
C: EHLO my_mail_server.com
S: <SMTP-Reply: code=250 line='DSN'>
S: pipelining extension supported.
S: size extension supported.
C: MAIL FROM:<my_mail@my_domain.com>
C: RCPT TO:<testmail@external_domail.com>
Apr 09 02:01:54 sogod [24300]: <0x0x777777d68b8[SOGoMailer]> error with recipient 'testmail@external_domail.com'
C: QUIT
S: <SMTP-Reply: code=221 line='2.0.0 Bye'>

8

Re: Sogo cannot send message: (smtp) originator not accepted

Any related error in Postfix log file?

9

Re: Sogo cannot send message: (smtp) originator not accepted

Apr 11 13:01:37 mx postfix/smtpd[23757]: connect from my_mail_server[127.0.0.1]
Apr 11 13:01:37 mx postfix/smtpd[23757]: NOQUEUE: reject: RCPT from my_mail_server[127.0.0.1]: 553 5.7.1 <user@my_domain.com>: Sender address rejected: not logged in; from=<user@my_domain.com> to=<mail@ext_domain.com> proto=ESMTP helo=<my_mail_server>
Apr 11 13:01:37 mx postfix/smtpd[23757]: disconnect from  my_mail_server[127.0.0.1]

10

Re: Sogo cannot send message: (smtp) originator not accepted

good4xp wrote:

Sender address rejected: not logged in

Seems SOGo didn't perform smtp auth.
Please try to add "SOGoSMTPAuthenticationType = PLAIN;" in sogo.conf, restart sogo service, then try again.

11

Re: Sogo cannot send message: (smtp) originator not accepted

ZhangHuangbin wrote:
good4xp wrote:

Sender address rejected: not logged in

Seems SOGo didn't perform smtp auth.
Please try to add "SOGoSMTPAuthenticationType = PLAIN;" in sogo.conf, restart sogo service, then try again.

New message:

Warning
cannot send message: (smtp) authentication failure

is it possible that sogo going to wrong port?


Thank for reply!

12

Re: Sogo cannot send message: (smtp) originator not accepted

Seems you have to comment out "SOGoSMTPAuthenticationType = PLAIN;" and try again.

It's a shame on SOGo team that they don't implement "Support for SMTP SASL AUTH and SMTP TLS/SSL", which is a 7-year old feature request, and SASL AUTH is a must-have nowadays.
http://sogo.nu/bugs/view.php?id=31

13

Re: Sogo cannot send message: (smtp) originator not accepted

ZhangHuangbin wrote:

Seems you have to comment out "SOGoSMTPAuthenticationType = PLAIN;" and try again.

It's a shame on SOGo team that they don't implement "Support for SMTP SASL AUTH and SMTP TLS/SSL", which is a 7-year old feature request, and SASL AUTH is a must-have nowadays.
http://sogo.nu/bugs/view.php?id=31

This parameter was commented in previous attempts... How did you implement this SOGo at your mailserver? I think you have working examples?....
When comment out I have this error: Cannot send message: all recipients are invalid.


Could you please suggest any calendar util like sogo that is possible to implement into iredmail server?

Big thanks for your reply!

Regards

14

Re: Sogo cannot send message: (smtp) originator not accepted

This is the default sogo.conf used in iRedMail, it works fine:
https://bitbucket.org/zhb/iredmail/src/ … /sogo.conf

15

Re: Sogo cannot send message: (smtp) originator not accepted

ZhangHuangbin wrote:

This is the default sogo.conf used in iRedMail, it works fine:
https://bitbucket.org/zhb/iredmail/src/ … /sogo.conf

Hello, Just fix a ploblem.

Need to set a smtp-avamis port:

SOGoSMTPServer = 127.0.0.1:10024;


You may close this threat.

16

Re: Sogo cannot send message: (smtp) originator not accepted

good4xp wrote:

Need to set a smtp-avamis port:
SOGoSMTPServer = 127.0.0.1:10024;

Port 10024 shouldn't be used as normal smtp service, you should use port 25 instead.

17

Re: Sogo cannot send message: (smtp) originator not accepted

ZhangHuangbin wrote:
good4xp wrote:

Need to set a smtp-avamis port:
SOGoSMTPServer = 127.0.0.1:10024;

Port 10024 shouldn't be used as normal smtp service, you should use port 25 instead.

25 port doesn't work in my config. If have any idea how to get that work I would be appreciate.

Regards

18

Re: Sogo cannot send message: (smtp) originator not accepted

Could you please show us output of command:

postconf -n

19

Re: Sogo cannot send message: (smtp) originator not accepted

postconf -n
# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
allow_percent_hack = no
biff = no
bounce_queue_lifetime = 4h
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
delay_warning_time = 0h
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
enable_original_recipient = no
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailbox_command = /usr/libexec/dovecot/deliver
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_backoff_time = 4000s
maximal_queue_lifetime = 4h
message_size_limit = 9000000
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
mydomain = my_domaindomain.com
myhostname = my_server.com
mynetworks = x.x.x.x/24
mynetworks_style = host
myorigin = my_server.com
newaliases_path = /usr/bin/newaliases.postfix
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions
queue_directory = /var/spool/postfix
queue_run_delay = 300s
readme_directory = /usr/share/doc/postfix-2.11.0/README_FILES
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/relay_domains.cf
sample_directory = /usr/share/doc/postfix-2.11.0/samples
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp-amavis_destination_recipient_limit = 1
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_loglevel = 0
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_helo_access pcre:/etc/postfix/helo_access.pcre
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
smtpd_tls_CAfile = /etc/pki/tls/certs/gd_bundle.crt
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/pki/tls/certs/my_server.com.pem
smtpd_tls_dh1024_param_file = /etc/pki/tls/dhparams.pem
smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
smtpd_tls_key_file = /etc/pki/tls/private/my_server.com.key
smtpd_tls_loglevel = 0
smtpd_tls_security_level = may
swap_bangpath = no
tls_random_source = dev:/dev/urandom
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/catchall_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
virtual_gid_maps = static:2000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_minimum_uid = 2000
virtual_transport = dovecot
virtual_uid_maps = static:2000

20

Re: Sogo cannot send message: (smtp) originator not accepted

Does it work if you configure Postfix to listen on EXTRA port for smtp service? e.g. 2525.

*) Add below line in /etc/postfix/master.cf:

127.0.0.1:2525     pass  -       -       y       -       -       smtpd
    -o content_filter=smtp-amavis:[127.0.0.1]:10026

*) Update "SOGoSMTPServer = 127.0.0.1:2525;" in sogo.conf.

21

Re: Sogo cannot send message: (smtp) originator not accepted

ZhangHuangbin wrote:

Does it work if you configure Postfix to listen on EXTRA port for smtp service? e.g. 2525.

Not working, error message:
Cannot send message: error when connecting to the SMTP server.

22

Re: Sogo cannot send message: (smtp) originator not accepted

Any related log in Postfix log file?

23 (edited by good4xp 2016-04-26 15:13:57)

Re: Sogo cannot send message: (smtp) originator not accepted

ZhangHuangbin wrote:

Any related log in Postfix log file?

Nothing. It is looking like nothing reached the postfix.


But i changed SOGo setting to:
SOGoSMTPServer = 127.0.0.1:10026;


And messages are going outside.

24

Re: Sogo cannot send message: (smtp) originator not accepted

Port 10026 is used for internal relay between Amavisd and Postfix, do NOT use it as a normal SMTP service.

25

Re: Sogo cannot send message: (smtp) originator not accepted

ZhangHuangbin wrote:

Port 10026 is used for internal relay between Amavisd and Postfix, do NOT use it as a normal SMTP service.

What purpose of 10024 port? At this port SOGo work too.