LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-21-2011, 03:24 AM   #16
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032

I don't quite understand what you mean by a workaround from the ISP side.
If you want to run a mailserver and be able to send and receive mail, you need a domain registered in some dns and your mailserver being the MX record for that domain.
Without it, for just sending out mail you can use the tricks above (masquerading, genericstable etc). But you'll never be able to receive mail.

BTW, did you try the genericstable way?
 
Old 05-21-2011, 03:46 AM   #17
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
there is no such file in /etc
Code:
root@srv1:~# find / -name "genericstable" 
/usr/share/sendmail/examples/db/genericstable
Also the entries in genericstable are different between what you said and what the link says
the link says:
Code:
@host1.example.com    %1@example.com
@host2.example.com    %1@example.com
So in my case it is:
Code:
srv1.myisp.com    %1@myisp.com
but you say:
Code:
mahmood@srv1 mahmood@myisp.com
Quote:
I don't quite understand what you mean by a workaround from the ISP side.
Let me explain in this way. As you said, Yahoo accepts incoming emails from myisp.com since it doesn't know mahmood@srv1

Also myisp.com first receive emails from mahmood@srv1 and then relays them to Yahoo. If myisp.com does not know mahmood@srv1, then it will discard my emails. Is that right? What I meant was that should I tell myisp.com to add mahmood@srv1 to its trusted list?


UPDATE:
Before trying genericstable, here is the results of sendmail
Code:
mahmood@srv1:freqmine$ sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /tryflags HS
> /try esmtp someone@yahoo.com
Trying header sender address someone@yahoo.com for mailer esmtp
canonify           input: someone @ yahoo . com
Canonify2          input: someone < @ yahoo . com >
Canonify2        returns: someone < @ yahoo . com . >
canonify         returns: someone < @ yahoo . com . >
1                  input: someone < @ yahoo . com . >
1                returns: someone < @ yahoo . com . >
HdrFromSMTP        input: someone < @ yahoo . com . >
PseudoToReal       input: someone < @ yahoo . com . >
PseudoToReal     returns: someone < @ yahoo . com . >
MasqSMTP           input: someone < @ yahoo . com . >
MasqSMTP         returns: someone < @ yahoo . com . >
MasqHdr            input: someone < @ yahoo . com . >
MasqHdr          returns: someone < @ yahoo . com . >
HdrFromSMTP      returns: someone < @ yahoo . com . >
final              input: someone < @ yahoo . com . >
final            returns: someone @ yahoo . com
Rcode = 0, addr = someone@yahoo.com
>
Also I have corrected /etc/hosts:
Code:
mahmood@srv1:~$ cat /etc/hosts
127.0.0.1	localhost.localdomain localhost 
192.168.1.1     srv1
195.25.62.105  srv1 srv1.myisp.com
192.168.1.2     client1
192.168.1.3     client2
192.168.1.4     client3

Last edited by mahmoodn; 05-21-2011 at 03:52 AM.
 
Old 05-21-2011, 04:10 AM   #18
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If genericstable doesn't exist, you have to create it. And then use "makemap hash" to hash it.
Since mail goes out as from mahmood@srv1, you need to rewrite this address.

Quote:
Also myisp.com first receive emails from mahmood@srv1 and then relays them to Yahoo. If myisp.com does not know mahmood@srv1, then it will discard my emails. Is that right? What I meant was that should I tell myisp.com to add mahmood@srv1 to its trusted list?
From the logs posted, your mailserver connects directly to yahoo to deliver the mail. There is no isp mailserver in between.
 
Old 05-21-2011, 05:33 AM   #19
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
Quote:
makemap hash
Code:
root@srv1:~# makemap hash
Usage: makemap [-C cffile] [-N] [-c cachesize] [-D commentchar]
               [-d] [-e] [-f] [-l] [-o] [-r] [-s] [-t delimiter]
               [-u] [-v] type mapname
Do you mean
Code:
makemap hash /etc/genericstable
?
 
Old 05-21-2011, 07:49 AM   #20
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Yes I mean the usual:
Code:
makemap hash /etc/mail/genericstable <  /etc/mail/genericstable
I don't know about ubuntu, but in general all these files relative to sendmail's features are located in /etc/mail
 
Old 05-21-2011, 08:15 AM   #21
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
This is what I did
Code:
root@srv1:~# cat /etc/mail/genericstable
mahmood@srv1 mahmood@srv1.myisp.com

root@srv1:~# makemap hash /etc/mail/genericstable < /etc/mail/genericstable

root@srv1:~# cat /etc/mail/sendmail.mc
divert(-1)dnl
#-----------------------------------------------------------------------------
# $Sendmail: debproto.mc,v 8.14.3 2010-02-15 09:38:10 cowboy Exp $
#
# Copyright (c) 1998-2009 Richard Nelson.  All Rights Reserved.
#
# cf/debian/sendmail.mc.  Generated from sendmail.mc.in by configure.
#
# sendmail.mc prototype config file for building Sendmail 8.14.3
#
# Note: the .in file supports 8.7.6 - 9.0.0, but the generated
#       file is customized to the version noted above.
#
# This file is used to configure Sendmail for use with Debian systems.
#
# If you modify this file, you will have to regenerate /etc/mail/sendmail.cf
# by running this file through the m4 preprocessor via one of the following:
#       * make   (or make -C /etc/mail)
#       * sendmailconfig
#       * m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# The first two options are preferred as they will also update other files
# that depend upon the contents of this file.
#
# The best documentation for this .mc file is:
# /usr/share/doc/sendmail-doc/cf.README.gz
#
#-----------------------------------------------------------------------------
divert(0)dnl
#
#   Copyright (c) 1998-2005 Richard Nelson.  All Rights Reserved.
#
#  This file is used to configure Sendmail for use with Debian systems.
#
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.14.3-9.1ubuntu1 2010-02-15 09:38:10 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
undefine(`confHOST_STATUS_DIRECTORY')dnl        #DAEMON_HOSTSTATS=
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
dnl #
dnl # General defines
dnl #
dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
dnl #   into this directory before writing files.
dnl #   If *all* your user accounts are under /home then use that
dnl #   instead - it will prevent any writes outside of /home !
dnl #   define(`confSAFE_FILE_ENV',             `')dnl
dnl #
dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
dnl # Remove `, Addr=' clauses to receive from any interface
dnl # If you want to support IPv6, switch the commented/uncommentd lines
dnl #
FEATURE(`no_default_msa')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
dnl #
dnl # Define connection throttling and window length
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
dnl #
dnl # Features
dnl #
dnl # use /etc/mail/local-host-names
FEATURE(`use_cw_file')dnl
dnl #
dnl # The access db is the basis for most of sendmail's checking
FEATURE(`access_db', , `skip')dnl
dnl #
dnl # The greet_pause feature stops some automail bots - but check the
dnl # provided access db for details on excluding localhosts...
FEATURE(`greet_pause', `1000')dnl 1 seconds
dnl #
dnl # Delay_checks allows sender<->recipient checking
FEATURE(`delay_checks', `friend', `n')dnl
dnl #
dnl # If we get too many bad recipients, slow things down...
define(`confBAD_RCPT_THROTTLE',`3')dnl
dnl #
dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
dnl #
dnl # If you're on a dialup link, you should enable this - so sendmail
dnl # will not bring up the link (it will queue mail for later)
dnl define(`confCON_EXPENSIVE',`True')dnl
dnl #
dnl # Dialup/LAN connection overrides
dnl #
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
dnl #
dnl # Default Mailer setup

FEATURE(genericstable)dnl
FEATURE(generics_entire_domain)dnl
FEATURE(masquerade_envelope)dnl
GENERICS_DOMAIN(`myisp.com')dnl

MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl


root@srv1:~# cat /etc/hosts
127.0.0.1       localhost.localdomain localhost
192.168.1.1     srv1
195.25.62.105  srv1 srv1.myisp.com
192.168.1.2     client1
192.168.1.3     client2
192.168.1.4     client3

# The following lines are desirable for IPv6 capable hosts
#::1     localhost ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters

root@srv1:~# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
root@srv1:~# /etc/init.d/sendmail restart
 * Restarting Mail Transport Agent (MTA) sendmail                                      [ OK ]
root@srv1:~# exit
exit
mahmood@srv1:~$ mail -s "test" someone@yahoo.com < test.txt
mahmood@srv1:~$
this is shown in the log
Code:
May 21 17:40:33 srv1 sm-mta[32363]: starting daemon (8.14.3): SMTP+queueing@00:10:00
May 21 17:40:44 srv1 sendmail[32383]: p4LDAinP032383: from=mahmood, size=83, class=0, nrcpts=1, msgid=<201105211310.p4LDAinP032383@srv1.myisp.com>, relay=mahmood@localhost
May 21 17:40:44 srv1 sm-mta[32384]: p4LDAiST032384: from=<mahmood@srv1.myisp.com>, size=346, class=0, nrcpts=1, msgid=<201105211310.p4LDAinP032383@srv1.myisp.com>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]
May 21 17:40:44 srv1 sendmail[32383]: p4LDAinP032383: to=<someone@yahoo.com>, ctladdr=mahmood (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30083, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p4LDAiST032384 Message accepted for delivery)
May 21 17:42:01 srv1 sm-mta[32386]: p4LDAiST032384: to=<someone@yahoo.com>, ctladdr=<mahmood@srv1.myisp.com> (1000/1000), delay=00:01:17, xdelay=00:01:17, mailer=esmtp, pri=120346, relay=b.mx.mail.yahoo.com. [74.6.136.65], dsn=4.0.0, stat=Deferred: b.mx.mail.yahoo.com.: No route to host
I gave up....
 
Old 05-21-2011, 08:32 AM   #22
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
May 21 17:40:44 srv1 sm-mta[32384]: p4LDAiST032384: from=<mahmood@srv1.myisp.com>,
At least now the sender address was rewritten
You can try to send mail to some other address (in gmail maybe) and see what you get. Maybe your IP is banned temporarily from yahoo
 
Old 05-21-2011, 11:01 AM   #23
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
You know I can send email to myisp.com

I mean I have an email account on the domain some thing like mahmood.surname@myisp.com


May 21 19:24:32 srv1 sendmail[8127]: p4LEsW7U008127: to=<mahmood.surname@myisp.com>, ctladdr=mahmood (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30123, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p4LEsWPF008128 Message accepted for delivery)
May 21 19:24:36 srv1 sm-mta[8130]: p4LEsWPF008128: to=<mahmood.surname@myisp.com>, ctladdr=<mahmood@srv1.myisp.com> (1000/1000), delay=00:00:04, xdelay=00:00:04, mailer=esmtp, pri=120386, relay=somehting.myisp.com. [IP_ADDRESS], dsn=2.0.0, stat=Sent (ok 1305990321 qp 22735)

However I am not able to send to gmail or yahoo
 
Old 05-21-2011, 11:55 AM   #24
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
However I am not able to send to gmail or yahoo
If you get the same logs for gmail, then I guess it's your isp that blocks outgoing smtp connections. Can you try to connect to gmail:
Code:
telnet smtp.gmail.com 25
and see what happens?
If you can't connect, then you need to define your isp's mailserver as a smarthost for sendmail.
A quick way is to edit sendmail.cf and change DS to
Code:
DSsomehting.myisp.com
If you connect, but you get authentication errors, you should configure smtp auth. Check this to see what you need to change in sendmail configuration
 
Old 05-21-2011, 12:10 PM   #25
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
Code:
mahmood@srv1:~$ telnet smtp.gmail.com 25
Trying 74.125.79.109...
telnet: Unable to connect to remote host: No route to host
Regarding the authentication, it is stated
Quote:
<password> is the password that belongs to your smarthost username
That means I have to enter my password in a plain text file. Isn't secure....
 
Old 05-21-2011, 12:47 PM   #26
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If your isp accepts plain login, then you need to use your password unencrypted. Of course /etc/mail/client-info should have 600 permissions, so it can only be read by root. Note also that you can (re)move this file after you've hashed it.
If your isp accepts other forms of login (among those in onfAUTH_MECHANISMS), you can encrypt the password accordingly. You should contact your isp on this and use google to see how you can encrypt the password. One useful page could be this (especially step 7) to do some auth tests.
 
Old 05-23-2011, 12:19 AM   #27
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
Something is not clear for me.
On srv1, my username is mahmood
Also my email username at myisp.com is different. When I set smarthost as myisp.com, then this procedure is done:

source destination
mahmood@srv1 -> mahmood.surname@myisp.com
mahmood.surname@myisp.com -> gmail.com

at second step, mahmood@srv1 is encapsulated in mahmood.surname@myisp.com
Am I right?
 
Old 05-23-2011, 12:48 AM   #28
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
No.
You use the username mahmood.surname@myisp.com along with your password in order to connect to your isp mailserver and use it as a relay. This is done because your isp blocks all outgoing smtp traffic except for its mailserver.
There is no encapsulation if I can understand what you mean by this term. The mail you send will still have as a sender mahmood@srv1 (of course you need to fix srv1 to be a valid fqdn) and a recipient like user@gmail.com
 
Old 06-06-2011, 08:19 AM   #29
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
Hi
I come back... after some emailing with the myisp.com and receiving not so many useful information, I tried to solve it my self.

As I said my user account on the server is mahmood@srv1.myisp.com and I have an email account which is mahmood.surname@myisp.com (please note that the user name on the server is different from myisp.com email account).


The content of sendmail.mc is
Code:
mahmood@srv1:~$ cat /etc/mail/sendmail.mc
divert(-1)dnl

divert(0)dnl

define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.14.3-9.1ubuntu1 2010-02-15 09:38:10 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
undefine(`confHOST_STATUS_DIRECTORY')dnl        #DAEMON_HOSTSTATS=
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
dnl #
dnl # General defines
dnl #
dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
dnl #   into this directory before writing files.
dnl #   If *all* your user accounts are under /home then use that
dnl #   instead - it will prevent any writes outside of /home !
dnl #   define(`confSAFE_FILE_ENV',             `')dnl
dnl #
dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
dnl # Remove `, Addr=' clauses to receive from any interface
dnl # If you want to support IPv6, switch the commented/uncommentd lines
dnl #
FEATURE(`no_default_msa')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
dnl #
dnl # Define connection throttling and window length
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
dnl #
dnl # Features
dnl #
dnl # use /etc/mail/local-host-names
FEATURE(`use_cw_file')dnl
dnl #
dnl # The access db is the basis for most of sendmail's checking
FEATURE(`access_db', , `skip')dnl
dnl #
dnl # The greet_pause feature stops some automail bots - but check the
dnl # provided access db for details on excluding localhosts...
FEATURE(`greet_pause', `1000')dnl 1 seconds
dnl #
dnl # Delay_checks allows sender<->recipient checking
FEATURE(`delay_checks', `friend', `n')dnl
dnl #
dnl # If we get too many bad recipients, slow things down...
define(`confBAD_RCPT_THROTTLE',`3')dnl
dnl #
dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
dnl #
dnl # If you're on a dialup link, you should enable this - so sendmail
dnl # will not bring up the link (it will queue mail for later)
dnl define(`confCON_EXPENSIVE',`True')dnl
dnl #
dnl # Dialup/LAN connection overrides
dnl #
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
dnl #
dnl # Default Mailer setup

FEATURE(genericstable)dnl
FEATURE(generics_entire_domain)dnl
FEATURE(masquerade_envelope)dnl
GENERICS_DOMAIN(`myisp.com')dnl

MAILER_DEFINITIONS
define(`SMART_HOST', relayadd.myisp.com)dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo', `hash /etc/mail/auth/client-info')dnl

MAILER(`local')dnl
MAILER(`smtp')dnl
according to this , I have created a file "/etc/mail/auth/client-info" and filled with
Code:
AuthInfo:relayadd.myisp.com "U:mahmood.surname@myisp.com" "I:mahmood.surname@myisp.com" "P:the_password"
then I ran
Code:
sudo bash -c "cd /etc/mail/auth/ && makemap hash client-info < client-info"
and then restart
Code:
sudo bash -c "cd /etc/mail/ && m4 sendmail.mc > sendmail.cf"
Now when I run
Code:
mahmood@srv1:~$ mail -s "test" mahmood.surname@myisp.com < test.txt
immediately I receive the email and can see that in my mailbox. The log for this command is:
Code:
Jun  6 17:41:04 srv1 sendmail[30981]: p56DB4mE030981: from=mahmood, size=79, class=0, nrcpts=1, msgid=<201106061311.p56DB4mE030981@srv1.myisp.com>, relay=mahmood@localhost
Jun  6 17:41:04 srv1 sm-mta[30982]: p56DB4H6030982: from=<mahmood@srv1.myisp.com>, size=331, class=0, nrcpts=1, msgid=<201106061311.p56DB4mE030981@srv1.myisp.com>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]
Jun  6 17:41:04 srv1 sendmail[30981]: p56DB4mE030981: to=<mahmood.surname@myisp.com>, ctladdr=mahmood (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30079, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p56DB4H6030982 Message accepted for delivery)
Jun  6 17:41:05 srv1 sm-mta[30984]: p56DB4H6030982: to=<mahmood.surname@myisp.com>, ctladdr=<mahmood@srv1.myisp.com> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120331, relay=relayadd.myisp.com. [196.25.73.115], dsn=2.0.0, stat=Sent (ok 1307366540 qp 702)
however when I run
Code:
mahmood@srv1:~$ mail -s "test" something@gmail.com < test.txt
I get this
Code:
Jun  6 17:42:57 srv1 sendmail[31013]: p56DCv1b031013: from=mahmood, size=83, class=0, nrcpts=1, msgid=<201106061312.p56DCv1b031013@srv1.myisp.com>, relay=mahmood@localhost
Jun  6 17:42:57 srv1 sm-mta[31014]: p56DCvm8031014: from=<mahmood@srv1.myisp.com>, size=335, class=0, nrcpts=1, msgid=<201106061312.p56DCv1b031013@srv1.myisp.com>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]
Jun  6 17:42:57 srv1 sendmail[31013]: p56DCv1b031013: to=<something@gmail.com>, ctladdr=mahmood (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30083, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p56DCvm8031014 Message accepted for delivery)
Jun  6 17:42:57 srv1 sm-mta[31016]: p56DCvm8031014: to=<something@gmail.com>, ctladdr=<mahmood@srv1.myisp.com> (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120335, relay=relayadd.myisp.com. [196.25.73.115], dsn=5.1.3, stat=User unknown
Jun  6 17:42:57 srv1 sm-mta[31016]: p56DCvm8031014: p56DCvm8031016: DSN: User unknown
Jun  6 17:42:58 srv1 sm-mta[31016]: p56DCvm8031016: to=<mahmood@srv1.myisp.com>, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
what does stat=User unknown mean? when I send to myisp.com, there is no problem.

thanks
 
Old 06-06-2011, 12:44 PM   #30
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
what does stat=User unknown mean? when I send to myisp.com, there is no problem.
Means that you're not allowed to use your ISP's mailserver as a relay, probably because you're authenticated.
Maybe you should use U:mahmood@srv1.myisp.com (usually U and I are the same and you don't have to specify them both) and add a M:PLAIN LOGIN, e.g.
Code:
AuthInfo:relayadd.myisp.com "U:mahmood@srv1.myisp.com" "P:the_password" "M:LOGIN PLAIN"
But all these should be verified with your ISP.
If you cannot find a solution with him, consider using gmail smtp server on port 587 as a relay

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail stat=Deferred: Connection timed snq Linux - Server 1 12-18-2010 11:39 AM
sendmail: stat=Deferred: Connection reset by [127.0.0.1] guif Linux - Server 4 03-26-2010 03:41 PM
stat=Deferred: Connection refused by [127.0.0.1] masimiqbal Linux - Server 3 02-15-2010 08:39 AM
stat=deferred mrlucio79 Linux - Networking 0 03-09-2004 01:02 PM
sendmail stat=Deferred error gsimpson Linux - Networking 4 07-16-2003 08:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration