Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: Gedl on December 01, 2014, 10:46:18 AM
-
Hi folks,
I am new with SME server, especially in Linux, so I need a little assistance for my configuration to work. I tried to google and read the faq.
The SME Server works in Server only mode and stays behind a firewall. What I want to do is, that some internal clients on specific IP-adresses are able to send outgoing e-mail without authentification. This is because we still have some equipment (printers, copier, etc.) that only can send e-mails without authentification or encryption.
In Server config, the e-mail will be send via ISP.
But I dont get it to work. every time I try to send an e-mail I get the relayind denied status code.
Anybody who can help me?
thanks a lot! And sorry for my bad english...
Gedl
-
hi, welcome here
you need a custom fragment, so
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients
cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients
nano 60myAppliance
now, add to the open file ip address you need to enable:
{
$OUT .= "first_ip";
$OUT .= "second_ip";
}
and so on..
save and exit with Ctr-X, Y
then
signal-event email-update
not tested, should work
let us know
-
Hi Stefano,
thanks for your support.
This doesn´t work, still the same issues. How can i put attachments on? I have the various log files to show.
Any suggestions?
Thanks for help.
Gedl
-
just paste here log's excerpts using the "code" tag
-
Please paste long logs here: https://gist.github.com/
-
OK,
this is my custom fragment:
{
$OUT .= "192.168.3.14";
....
$OUT .= "192.168.3.200";
}
this is my qpsmtplog after update email:
2014-12-01 12:06:55.397509500 32011 Accepted connection 0/40 from 192.168.3.14 / storage-01.domain.de
2014-12-01 12:06:55.397701500 32011 Connection from storage-01.domain.de [192.168.3.14]
2014-12-01 12:06:55.399727500 32011 tls plugin (init): ciphers: HIGH:!SSLv2:!ADH:!aNULL:!MD5:!RC4
2014-12-01 12:06:55.406684500 32011 tls plugin (init): ciphers: HIGH:!SSLv2:!ADH:!aNULL:!MD5:!RC4
2014-12-01 12:06:55.413970500 32011 tls plugin (init): ciphers: HIGH:!SSLv2:!ADH:!aNULL:!MD5:!RC4
2014-12-01 12:06:55.420272500 32011 220 zentrale.domain.de ESMTP
2014-12-01 12:06:55.420834500 32011 dispatching HELO TeraStation
2014-12-01 12:06:55.422007500 32011 250 domain.de Hi storage-01.domain.de [192.168.3.14]; I am so happy to meet you.
2014-12-01 12:06:55.463538500 32011 dispatching MAIL FROM:<admin@domain.de>
2014-12-01 12:06:55.463542500 32011 full from_parameter: FROM:<admin@domain.de>
2014-12-01 12:06:55.463544500 32011 getting mail from <admin@domain.de>
2014-12-01 12:06:55.463546500 32011 250 <admin@domain.de>, sender OK - how exciting to get mail from you!
2014-12-01 12:06:55.506941500 32011 dispatching RCPT TO:<admin@domain.de>
2014-12-01 12:06:55.506945500 32011 250 <admin@domain.de>, recipient ok
2014-12-01 12:06:55.507183500 32011 dispatching DATA
2014-12-01 12:06:55.507538500 32011 354 go ahead
2014-12-01 12:06:55.508445500 32011 spooling message to disk
2014-12-01 12:06:55.596045500 32011 logging::logterse plugin (deny): ` 192.168.3.14 storage-01.domain.de TeraStation <admin@domain.de> <admin@domain.de> check_basicheaders 901 Mail with no Date header not accepted here msg denied before queued
2014-12-01 12:06:55.596250500 32011 552 Mail with no Date header not accepted here
2014-12-01 12:06:55.596987500 32011 dispatching QUIT
2014-12-01 12:06:55.597249500 32011 221 domain.de closing connection. Have a wonderful day.
2014-12-01 12:06:55.597354500 32011 click, disconnecting
2014-12-01 12:06:56.357706500 2358 cleaning up after 32011
2014-12-01 12:08:38.318519500 1599 Accepted connection 0/40 from 192.168.3.200 / telekom.domain.de
2014-12-01 12:08:38.318729500 1599 Connection from telekom.domain.de [192.168.3.200]
2014-12-01 12:08:38.320789500 1599 tls plugin (init): ciphers: HIGH:!SSLv2:!ADH:!aNULL:!MD5:!RC4
2014-12-01 12:08:38.327886500 1599 tls plugin (init): ciphers: HIGH:!SSLv2:!ADH:!aNULL:!MD5:!RC4
2014-12-01 12:08:38.335155500 1599 tls plugin (init): ciphers: HIGH:!SSLv2:!ADH:!aNULL:!MD5:!RC4
2014-12-01 12:08:38.340482500 1599 220 zentrale.domain.de ESMTP
2014-12-01 12:08:38.340997500 1599 dispatching EHLO telekom.domain.de
2014-12-01 12:08:38.342888500 1599 250-domain.de Hi telekom.domain.de [192.168.3.200]
2014-12-01 12:08:38.342971500 1599 250-PIPELINING
2014-12-01 12:08:38.343026500 1599 250-8BITMIME
2014-12-01 12:08:38.343083500 1599 250-SIZE 15000000
2014-12-01 12:08:38.343155500 1599 250 STARTTLS
2014-12-01 12:08:38.343760500 1599 dispatching MAIL FROM:<zentrale@domain.de>
2014-12-01 12:08:38.344032500 1599 full from_parameter: FROM:<zentrale@domain.de>
2014-12-01 12:08:38.345324500 1599 getting mail from <zentrale@domain.de>
2014-12-01 12:08:38.345449500 1599 250 <zentrale@domain.de>, sender OK - how exciting to get mail from you!
2014-12-01 12:08:38.345884500 1599 dispatching RCPT TO:<abc@external-domain.de>
2014-12-01 12:08:38.348608500 1599 logging::logterse plugin (deny): ` 192.168.3.200 telekom.domain.de telekom.domain.de <zentrale@domain.de> rcpt_ok 901 Relaying denied (#5.7.1) msg denied before queued
2014-12-01 12:08:38.348780500 1599 550 Relaying denied (#5.7.1)
2014-12-01 12:08:38.349269500 1599 dispatching RSET
2014-12-01 12:08:38.349486500 1599 250 OK
2014-12-01 12:08:38.349885500 1599 dispatching QUIT
2014-12-01 12:08:38.350094500 1599 221 domain.de closing connection. Have a wonderful day.
2014-12-01 12:08:38.350228500 1599 click, disconnecting
2014-12-01 12:08:39.307392500 2358 cleaning up after 1599
This is the message log after email update:
Dec 1 12:00:52 zentrale esmith::event[24908]: Processing event: email-update
Dec 1 12:00:52 zentrale esmith::event[24908]: Running event handler: /etc/e-smith/events/email-update/S02adjust-dovecot
Dec 1 12:00:52 zentrale esmith::event[24908]: S02adjust-dovecot=action|Event|email-update|Action|S02adjust-dovecot|Start|1417431652 136747|End|1417431652 283652|Elapsed|0.146905
Dec 1 12:00:52 zentrale esmith::event[24908]: Running event handler: /etc/e-smith/events/actions/generic_template_expand
Dec 1 12:00:52 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/conf.menu.apps.php
Dec 1 12:00:52 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/turba/config/sources.php
Dec 1 12:00:52 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/turba/config/prefs.php
Dec 1 12:00:52 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/turba/config/conf.php
Dec 1 12:00:52 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/turba/config/attributes.php
Dec 1 12:00:52 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/config/hooks.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/config/prefs.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/config/registry.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/config/conf.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/config/mime_drivers.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/ingo/config/prefs.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/ingo/config/conf.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/ingo/config/backends.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/imp/config/trailer.txt
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/imp/config/hooks.php
Dec 1 12:00:53 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/imp/config/prefs.php
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/imp/config/servers.php
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/imp/config/conf.php
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/imp/config/header.txt
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /home/httpd/html/horde/imp/config/mime_drivers.php
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /etc/Muttrc
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /etc/hosts.deny
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /etc/services
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /etc/rsyslog.conf
Dec 1 12:00:54 zentrale esmith::event[24908]: expanding /etc/startmail
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/pine.conf
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/shells
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/crontab
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/mime.types
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/hosts.allow
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/clamd.conf
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/fetchmail
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/freshclam.conf
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/securetty
Dec 1 12:00:55 zentrale esmith::event[24908]: expanding /etc/rc.d/init.d/masq
Dec 1 12:00:56 zentrale esmith::event[24908]: expanding /etc/mail/spamassassin/local.cf
Dec 1 12:00:56 zentrale esmith::event[24908]: expanding /etc/httpd/conf/httpd.conf
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /etc/pam.d/dovecotadmin
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /etc/logrotate.d/clamscan
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /etc/dovecot/master.users
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /etc/dovecot/dovecot.conf
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /etc/sysconfig/rsyslog
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/badmailfrom
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/locals
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/virtualdomains
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/defaultdomain
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/databytes
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/helohost
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/rcpthosts
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/smtproutes
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/doublebounceto
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/concurrencyremote
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/me
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/defaulthost
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/bouncefrom
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/plusdomain
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/concurrencylocal
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/bouncehost
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/envnoathost
Dec 1 12:00:57 zentrale esmith::event[24908]: expanding /var/qmail/control/badrcptto
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/qmail/alias/.qmail-localdelivery-default
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/qmail/alias/.qmail-default
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/clamd/env/MEMLIMIT
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/pop3s/peers/local
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/pop3s/peers/0
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/pop3/peers/local
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/pop3/peers/0
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/sqpsmtpd/runenv
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/runenv
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/dnsbl_zones
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/signatures_patterns
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/spool_dir
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/dnsbl_allow
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/require_resolvable_fromhost
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/timeoutsmtpd
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/plugin_dirs
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/badhelo
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/loglevel
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/invalid_resolvable_fromhost
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/tls_ciphers
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/tls_before_auth
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/norelayclients
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/goodrcptto
Dec 1 12:00:58 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/relayclients
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/IP
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/memory_threshold
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/plugins
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/badrcptto_patterns
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/smtpgreeting
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/subject_prefix
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/rhsbl_zones
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/timeout
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/peers/local
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/config/peers/0
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/ssl/cert.pem
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/peers/local
Dec 1 12:00:59 zentrale esmith::event[24908]: expanding /var/service/qpsmtpd/peers/0
Dec 1 12:00:59 zentrale esmith::event[24908]: generic_template_expand=action|Event|email-update|Action|generic_template_expand|Start|1417431652 284115|End|1417431659 974081|Elapsed|7.689966
Dec 1 12:00:59 zentrale esmith::event[24908]: Running event handler: /etc/e-smith/events/email-update/S20qmail-update-user
Dec 1 12:01:00 zentrale esmith::event[24908]: S20qmail-update-user=action|Event|email-update|Action|S20qmail-update-user|Start|1417431659 974478|End|1417431660 315051|Elapsed|0.340573
Dec 1 12:01:00 zentrale esmith::event[24908]: Running event handler: /etc/e-smith/events/actions/adjust-services
Dec 1 12:01:00 zentrale esmith::event[24908]: adjusting supervised clamd (restart)
Dec 1 12:01:00 zentrale esmith::event[24908]: adjusting supervised clamd (up)
Dec 1 12:01:00 zentrale esmith::event[24908]: adjusting supervised smtp-auth-proxy (restart)
Dec 1 12:01:00 zentrale esmith::event[24908]: adjusting supervised smtp-auth-proxy (up)
Dec 1 12:01:00 zentrale esmith::event[24908]: adjusting supervised pop3s (down)
Dec 1 12:01:00 zentrale esmith::event[24908]: adjusting supervised pop3s (sigusr1)
Dec 1 12:01:00 zentrale esmith::event[24908]: adjusting non-supervised masq (adjust)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised httpd-e-smith (sigusr1)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised httpd-e-smith (up)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised spamd (restart)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised spamd (up)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised pop3 (down)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised pop3 (sigusr1)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised dovecot (sigusr2)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised dovecot (up)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised qmail (sighup)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised qmail (up)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised sqpsmtpd (sighup)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised sqpsmtpd (up)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised qpsmtpd (sighup)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjusting supervised qpsmtpd (up)
Dec 1 12:01:01 zentrale esmith::event[24908]: adjust-services=action|Event|email-update|Action|adjust-services|Start|1417431660 315586|End|1417431661 777224|Elapsed|1.461638
Maybe that helps?
Thanks a lot
Gedl
-
Hi,
I solved the problem by doing two things.
1. After getting the config of qpsmtpd (config show qpsmtpd), the part "RelayRequiresAuth" was "enabled". I "disabled" the "RelayRequiresAuth" and then, it works. I Don´t know if this is a general setting to be an open relay (so handle with care!) or it is specific in order of the things I´ve done before in this topic. In my case, it doesn´t matter, because the server itself is not reachable from WAN and has only the function to force e-mails via ISP from our technical equipment inside the LAN.
2. This was resolved by the FAQ here:
http://wiki.contribs.org/SME_Server:Documentation:FAQ:Section04#I_can.27t_receive.2Fsend_email_from_my_application_.28ACT.21.2C_vTiger.2C_MS_Outlook.2C_etc.29
Thanks for your support.
Gedl
-
now, add to the open file ip address you need to enable:
{
$OUT .= "first_ip";
$OUT .= "second_ip";
}
and so on..
That won't work - because $first_ip and $second_ip will be joined together in the output with no newline or space.
-
yes Charlie, as usual you're right
I forgot "\n" after each ip, my fault :-)
@Gedl:
{
$OUT .= "first_ip\n";
$OUT .= "second_ip\n";
}
-
Gedl and @all:
could you please test and verify bug 8704 (http://bugs.contribs.org/show_bug.cgi?id=8704)?
Thank you