LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Sendmail with free DynDns (~/.forward) problem (https://www.linuxquestions.org/questions/slackware-14/sendmail-with-free-dyndns-%7E-forward-problem-887964/)

PenguinWearsFedora 06-23-2011 12:15 PM

Sendmail with free DynDns (~/.forward) problem
 
Hi,

I should say that I'm not an expert of linux or sendmail. On my way to learning I'm trying to setup my sendmail server at home using free dydns account(server1.dyndns.org). I can send and receive emails to/from @hotmail, @yahoo, @gmail (the ones I've checked).

Code:

dnl# This is the default sendmail .mc file for Slackware.  To generate
dnl# the sendmail.cf file from this (perhaps after making some changes),
dnl# use the m4 files in /usr/share/sendmail/cf like this:
dnl#
dnl# cp sendmail-slackware.mc /usr/share/sendmail/cf/config.mc
dnl# cd /usr/share/sendmail/cf
dnl# sh Build config.cf
dnl#
dnl# You may then install the resulting .cf file:
dnl# cp config.cf /etc/mail/sendmail.cf
dnl#
include(`../m4/cf.m4')
VERSIONID(`default setup for Slackware Linux')dnl
OSTYPE(`linux')dnl
dnl# These settings help protect against people verifying email addresses
dnl# at your site in order to send you email that you probably don't want:
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
dnl# Uncomment the line below to send outgoing mail through an external server:
define(`SMART_HOST',`smtp.myrealisp.com')
dnl# No timeout for ident:
define(`confTO_IDENT', `0')dnl
dnl# Enable the line below to use smrsh to restrict what sendmail can run:
dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
dnl# See the README in /usr/share/sendmail/cf for a ton of information on
dnl# how these options work:
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
dnl FEATURE(`accept_unresolvable_domains')dnl
EXPOSED_USER(`root')dnl
dnl# Also accept mail for localhost.localdomain:
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl

Following is access file (access.db created using makemap hash)
Code:

$ cat /etc/mail/access
Connect:localhost              RELAY
Connect:127.0.0.1              RELAY
Connect:hotmail.com            RELAY

Now I'm trying to forward emails coming to my local inbox(tux@server1.dyndns.org) to my hotmail account. For this to work, server1 should be able to RELAY messages originated from hotmail.com, so I added hotmail.com entry to access file. Also I've made ~/.forward file:

$ cat ~/.forward
username@hotmail.com

But the problem is I receive an error message in /var/log/maillog & also a message is sent to root@server1:

Code:

$ tail /var/log/maillog
Jun 23 21:23:15 server1 sm-mta[3647]: p5NGNCSE003647: from=<username@hotmail.com>, size=1306, class=0, nrcpts=1, msgid=<BLU158-w36F4AFFC3D6CCCEA9F6E79B7530@phx.gbl>, proto=ESMTP, daemon=MTA, relay=blu0-omc3-s22.blu0.hotmail.com [65.55.116.97]
Jun 23 21:23:17 server1 sm-mta[3648]: p5NGNCSE003647: to=username@hotmail.com, delay=00:00:03, xdelay=00:00:02, mailer=relay, pri=31541, relay=smtp.myrealisp.com. [xxx.xxx.163.175], dsn=5.1.1, stat=User unknown
Jun 23 21:23:17 server1 sm-mta[3648]: p5NGNCSE003647: p5NGNHSE003648: DSN: User unknown
Jun 23 21:23:17 server1 sm-mta[3648]: p5NGNHSE003648: to=<username@hotmail.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32565, relay=smtp.myrealisp.com., dsn=4.0.0, stat=Deferred: Connection reset by smtp.myrealisp.com.

Part of message sent to root@server1 is:
Code:

  ----- The following addresses had permanent fatal errors -----
<username@hotmail.com>
    (reason: 554 rejecting banned content)

  ----- Transcript of session follows -----
... while talking to smtp.myrealisp.com.:
>>> DATA
<<< 554 rejecting banned content
554 5.0.0 Service unavailable

Any idea about the error message?

ponce 06-23-2011 12:33 PM

I think for what you want to do you don't need to relay for hotmail (not a good idea and no surprise your isp doesn't accept your relaying), but you need only a line in /etc/aliases
Code:

tux: username@hotmail.com
then run newaliases.
after your sendmail will normally forward the mail via smtp (using your isp's server as a smarthost, like you configured) to your hotmail address.

PenguinWearsFedora 06-23-2011 05:23 PM

Thanks for your reply. I've added "tux: username@hotmail.com" to /etc/mail/aliases file and run newaliases command, restarted sendmail script. Now it gives the same 554 error message.

If my sendmail is letting the message through so it means there is no problem on my end? and it's something to do with ISP?

PenguinWearsFedora 10-24-2011 12:37 AM

Sorry to dig up my old thread, but I'm trying to have a shot at this again.

I've added this to /etc/aliases file
tux: username@hotmail.com

If I send email from a local user(root) it is forwarded to above hotmail account, no problem there. But what I'm trying to do is that if I send an email from my hotmail account to tux@server1.dyndns.org then it should go to username@hotmail.com. It's not happening. I see same error message in /var/log/maillog

"stat=Deferred: Connection reset by smtp.myrealisp.com."

Is it something to do with my ISP not relaying messages that originated not from my local machine?

PS. Admin can move this to Server forum please, if appropriate.


All times are GMT -5. The time now is 12:08 PM.