aloknet21
asked on
How to configure sendmail in RHEL 5?
i have booked my domain itcplant.com at myhostings and created following records. Now i want to setup my own mail server in RHEL 5. should i configure DNS SERVER and than configure sendmail?.
How to setup send mail including iptables and spamassasin? Is any antivirus required for server so that virus attack can stop? How to better control spam mail in sendmail?
NAME SERVER (NS) RECORDS
ZONE SERVER
@ ns.xxxx.com.
@ ns2.xxxxx.com.
MAIL (MX) RECORDS
ZONE SERVER PRIORITY
@ mail 1
HOST (A) RECORDS
ZONE SERVER
ftp 72.x.x.116
smtp 168.x.x.180
mail 61.x.x.202 --- this is my ip which i want to assign for mail server.
@ 168.x.1.35
How to setup send mail including iptables and spamassasin? Is any antivirus required for server so that virus attack can stop? How to better control spam mail in sendmail?
NAME SERVER (NS) RECORDS
ZONE SERVER
@ ns.xxxx.com.
@ ns2.xxxxx.com.
MAIL (MX) RECORDS
ZONE SERVER PRIORITY
@ mail 1
HOST (A) RECORDS
ZONE SERVER
ftp 72.x.x.116
smtp 168.x.x.180
mail 61.x.x.202 --- this is my ip which i want to assign for mail server.
@ 168.x.1.35
ASKER
yes these entries are at myhosting where i have booked my domain.
Thanks for referencing these site looking through than let you know if any problem persist.
Thanks a lot for your support!
Thanks for referencing these site looking through than let you know if any problem persist.
Thanks a lot for your support!
ASKER
divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # make -C /etc/mail
dnl #
include(`/usr/share/sendma il-cf/m4/c f.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # Do not advertize sendmail version.
dnl #
dnl define(`confSMTP_LOGIN_MSG ', `$j Sendmail; $b')dnl
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
dnl define(`confLOG_LEVEL', `9')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl define(`SMART_HOST', `168.144.68.180')dnl
dnl #
define(`confDEF_USER_ID', ``8:12'')dnl
dnl define(`confAUTO_REBUILD') dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LI ST', `True')dnl
define(`confDONT_PROBE_INT ERFACES', `True')dnl
define(`PROCMAIL_MAILER_PA TH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics' )dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS' , `authwarnings,novrfy,noexp n,restrict qrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
dnl define(`confAUTH_OPTIONS', `A p')dnl
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl # Please remember that saslauthd needs to be running for AUTH.
dnl #
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISM S', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl # cd /usr/share/ssl/certs; make sendmail.pem
dnl # Complete usage:
dnl # make -C /usr/share/ssl/certs usage
dnl #
dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bun dle.crt')d nl
dnl define(`confSERVER_CERT', `/etc/pki/tls/certs/sendma il.pem')dn l
dnl define(`confSERVER_KEY', `/etc/pki/tls/certs/sendma il.pem')dn l
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SEN DMAIL', `groupreadablekeyfile')dnl
dnl #
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN ', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db') dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db ')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain) dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl #
dnl # The following limits the number of processes sendmail can fork to accept
dnl # incoming messages or process its message queues to 20.) sendmail refuses
dnl # to accept connections once it has reached its quota of child processes.
dnl #
dnl define(`confMAX_DAEMON_CHI LDREN', `20')dnl
dnl #
dnl # Limits the number of new connections per second. This caps the overhead
dnl # incurred due to forking new sendmail processes. May be useful against
dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address
dnl # limit would be useful but is not available as an option at this writing.)
dnl #
dnl define(`confCONNECTION_RAT E_THROTTLE ', `3')dnl
dnl #
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
dnl #
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipie nts')dnl
EXPOSED_USER(`root')dnl
dnl #
dnl # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment
dnl # the following 2 definitions and activate below in the MAILER section the
dnl # cyrusv2 mailer.
dnl #
dnl define(`confLOCAL_MAILER', `cyrusv2')dnl
dnl define(`CYRUSV2_MAILER_ARG S', `FILE /var/lib/imap/socket/lmtp' )dnl
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submi ssion, Name=MSA, M=Ea')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 465, but
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
dnl #
dnl # For this to work your OpenSSL certificates must be configured.
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
dnl # device. Remove the loopback address restriction listen to the network.
dnl #
dnl DAEMON_OPTIONS(`port=smtp, Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl #
dnl # enable both ipv6 and ipv4 in sendmail:
dnl #
dnl DAEMON_OPTIONS(`Name=MTA-v 4, Family=inet, Name=MTA-v6, Family=inet6')
dnl #
dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
# FEATURE(`accept_unresolvab le_domains ')dnl
dnl #
dnl FEATURE(`relay_based_on_MX ')dnl
dnl #
dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`emailitcplan t.com')dnl
dnl #
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
dnl MASQUERADE_AS(`emailitcpla nt.com')dn l
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE('masquerade_envelo pe')dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_ domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhos t)dnl
dnl MASQUERADE_DOMAIN(localhos t.localdom ain)dnl
dnl MASQUERADE_DOMAIN(mydomain alias.com) dnl
dnl MASQUERADE_DOMAIN(mydomain .lan)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # make -C /etc/mail
dnl #
include(`/usr/share/sendma
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # Do not advertize sendmail version.
dnl #
dnl define(`confSMTP_LOGIN_MSG
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
dnl define(`confLOG_LEVEL', `9')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl define(`SMART_HOST', `168.144.68.180')dnl
dnl #
define(`confDEF_USER_ID', ``8:12'')dnl
dnl define(`confAUTO_REBUILD')
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LI
define(`confDONT_PROBE_INT
define(`PROCMAIL_MAILER_PA
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics'
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS'
define(`confAUTH_OPTIONS',
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
dnl define(`confAUTH_OPTIONS',
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl # Please remember that saslauthd needs to be running for AUTH.
dnl #
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISM
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl # cd /usr/share/ssl/certs; make sendmail.pem
dnl # Complete usage:
dnl # make -C /usr/share/ssl/certs usage
dnl #
dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bun
dnl define(`confSERVER_CERT', `/etc/pki/tls/certs/sendma
dnl define(`confSERVER_KEY', `/etc/pki/tls/certs/sendma
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SEN
dnl #
dnl define(`confTO_QUEUEWARN',
dnl define(`confTO_QUEUERETURN
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db
FEATURE(redirect)dnl
FEATURE(always_add_domain)
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl #
dnl # The following limits the number of processes sendmail can fork to accept
dnl # incoming messages or process its message queues to 20.) sendmail refuses
dnl # to accept connections once it has reached its quota of child processes.
dnl #
dnl define(`confMAX_DAEMON_CHI
dnl #
dnl # Limits the number of new connections per second. This caps the overhead
dnl # incurred due to forking new sendmail processes. May be useful against
dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address
dnl # limit would be useful but is not available as an option at this writing.)
dnl #
dnl define(`confCONNECTION_RAT
dnl #
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
dnl #
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipie
EXPOSED_USER(`root')dnl
dnl #
dnl # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment
dnl # the following 2 definitions and activate below in the MAILER section the
dnl # cyrusv2 mailer.
dnl #
dnl define(`confLOCAL_MAILER',
dnl define(`CYRUSV2_MAILER_ARG
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(`Port=smtp,
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submi
dnl #
dnl # The following causes sendmail to additionally listen to port 465, but
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
dnl #
dnl # For this to work your OpenSSL certificates must be configured.
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
dnl # device. Remove the loopback address restriction listen to the network.
dnl #
dnl DAEMON_OPTIONS(`port=smtp,
dnl #
dnl # enable both ipv6 and ipv4 in sendmail:
dnl #
dnl DAEMON_OPTIONS(`Name=MTA-v
dnl #
dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
# FEATURE(`accept_unresolvab
dnl #
dnl FEATURE(`relay_based_on_MX
dnl #
dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`emailitcplan
dnl #
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
dnl MASQUERADE_AS(`emailitcpla
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE('masquerade_envelo
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_
dnl #
dnl MASQUERADE_DOMAIN(localhos
dnl MASQUERADE_DOMAIN(localhos
dnl MASQUERADE_DOMAIN(mydomain
dnl MASQUERADE_DOMAIN(mydomain
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl
ASKER
this is my configuration of sendmail. i am not able to send mail to outside of my domain like gmail or other domain.
please tell me iptables rule also to allow smtp and pop. currently iptables is off
please tell me iptables rule also to allow smtp and pop. currently iptables is off
@please tell me iptables rule also to allow smtp and pop. currently iptables is off"
if iptables is off or flushed then you should be able to send and received without any problem, if iptables is enabled then you need to open port 25 for smtp and 110 for pop.
sent the output of ,
iptables -L
now about not sending emails outside, :
what the problem do you face when you sent email outside ??
i am seeing you using smart host
dnl define(`SMART_HOST', `168.144.68.180')dnl
are you authorized to send email via this server[168.144.68.180] ??
if iptables is off or flushed then you should be able to send and received without any problem, if iptables is enabled then you need to open port 25 for smtp and 110 for pop.
sent the output of ,
iptables -L
now about not sending emails outside, :
what the problem do you face when you sent email outside ??
i am seeing you using smart host
dnl define(`SMART_HOST', `168.144.68.180')dnl
are you authorized to send email via this server[168.144.68.180] ??
ASKER
But i am only able to receive mail from gmail or etc to this domain.
Yes receiving emails is always easy if you setup your Mx record
Sending emails is the problem
AS i said, you are using Smart host, so that mean, you are passing your email to another server to sent email .
so the server you passing your email , are you authorized to send email via that server ??
Sending emails is the problem
AS i said, you are using Smart host, so that mean, you are passing your email to another server to sent email .
so the server you passing your email , are you authorized to send email via that server ??
ASKER
the message could not be send because receipent was rejected by server.server 61.16.236.202 protocol SMTP , server response 550.5.7.1 Relaying denied ip name lookup failed port 25.
above is the message i am getting while sending mail to outside domain.
i have disable now smart host option.
i have setup outlook express and setting like user authentication is on.
above is the message i am getting while sending mail to outside domain.
i have disable now smart host option.
i have setup outlook express and setting like user authentication is on.
to access your sendmail from outlook , you will have to do more things . i will come back to that options later on
Lets fix your sendmail first
so you took off your smart host options ??
now try to send an email from your server like this :
cat /etc/hosts | mail -s "test" youremailaddress
after this
go to
/var/log/
tail -f maillog
i want to see the last 2 to 3 s assoicated with that email address, just copy and past here
Lets fix your sendmail first
so you took off your smart host options ??
now try to send an email from your server like this :
cat /etc/hosts | mail -s "test" youremailaddress
after this
go to
/var/log/
tail -f maillog
i want to see the last 2 to 3 s assoicated with that email address, just copy and past here
ASKER
56715, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[10.50.0.2]
Feb 14 20:43:36 localhost sendmail[17254]: n1EFDXen017254: <pankajk@itcplant.com>... User unknown
Feb 14 20:43:36 localhost sendmail[17254]: n1EFDXen017254: <pankajs@itcplant.com>... User unknown
Feb 14 20:43:37 localhost sendmail[17254]: n1EFDXen017254: from=<kefxaviercompanydiz@ xaviercomp any.com>, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[10.50.0.2]
i think some spam activiy is going on this server now.
because these are not in configured at my server.
i have done setting of smart host as default.
Feb 14 20:43:36 localhost sendmail[17254]: n1EFDXen017254: <pankajk@itcplant.com>... User unknown
Feb 14 20:43:36 localhost sendmail[17254]: n1EFDXen017254: <pankajs@itcplant.com>... User unknown
Feb 14 20:43:37 localhost sendmail[17254]: n1EFDXen017254: from=<kefxaviercompanydiz@
i think some spam activiy is going on this server now.
because these are not in configured at my server.
i have done setting of smart host as default.
ASKER
# Do not remove the following line, or various programs
# that require network functionality will fail.
120.0.0.1 localhost.localdomain localhost
10.50.0.6 itcplant.com itc
61.16.236.202 itcplant.com itc
etc/hosts file is configured as above
# that require network functionality will fail.
120.0.0.1 localhost.localdomain localhost
10.50.0.6 itcplant.com itc
61.16.236.202 itcplant.com itc
etc/hosts file is configured as above
ASKER
# by default we allow relaying from localhost...
Connect:localhost.localdom ain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
10.50.0.0 RELAY
etc/mail/access is configured as above
Connect:localhost.localdom
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
10.50.0.0 RELAY
etc/mail/access is configured as above
ASKER
Feb 14 20:49:51 localhost sendmail[17339]: n1EFJp5F017339: from=<alok@itcplant.com>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=[10.50.0.2]
Feb 14 20:49:51 localhost dovecot: pop3-login: Login: user=<alok>, method=PLAIN, rip=::ffff:10.50.0.2, lip=::ffff:10.50.0.6
Feb 14 20:49:51 localhost dovecot: POP3(alok): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
i think this is the log which you are asking about.
Feb 14 20:49:51 localhost dovecot: pop3-login: Login: user=<alok>, method=PLAIN, rip=::ffff:10.50.0.2, lip=::ffff:10.50.0.6
Feb 14 20:49:51 localhost dovecot: POP3(alok): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
i think this is the log which you are asking about.
ASKER
now i have received a mail from root to alok. at outlook express.
it is details about etc/hosts file
it is details about etc/hosts file
yes thats fine
to send email to another email SErver first of all you need to fix the name of your localhost
if your Mx record is mail.yourdomain.com
then your /etc/hosts file should be lke this
Ip mail.yourdomain.com localhost
so this is your mail log
# Do not remove the following line, or various programs
# that require network functionality will fail.
120.0.0.1 localhost.localdomain localhost
10.50.0.6 itcplant.com itc
61.16.236.202 itcplant.com itc
whats is your Mx record ??
is this mail.itcplant.com ??
to send email to another email SErver first of all you need to fix the name of your localhost
if your Mx record is mail.yourdomain.com
then your /etc/hosts file should be lke this
Ip mail.yourdomain.com localhost
so this is your mail log
# Do not remove the following line, or various programs
# that require network functionality will fail.
120.0.0.1 localhost.localdomain localhost
10.50.0.6 itcplant.com itc
61.16.236.202 itcplant.com itc
whats is your Mx record ??
is this mail.itcplant.com ??
ASKER
Host A Records
ftp 72.32.184.116
smtp 168.144.68.180
mail 61.16.236.202
these are the record i found at hosting site.
ftp 72.32.184.116
smtp 168.144.68.180
mail 61.16.236.202
these are the record i found at hosting site.
ASKER
yes this mail.itcplant.com.
then you need to chagne your /etc/hosts to mail.itcplant.com [ i will come back this one later on]
is this your vps server [ i meant is this server directly connected to public ip ] or this mailserver is behind a router and public ip is connected to that router
also :
sent me an email from your server like this
create a any file
touch testfile.txt
cat textfile.txt | mail -s "test" fosiul@websolution4u.co.uk
and from /var/log/maillog sent me full log related to this email
or just grub last 10 log and attach here.
is this your vps server [ i meant is this server directly connected to public ip ] or this mailserver is behind a router and public ip is connected to that router
also :
sent me an email from your server like this
create a any file
touch testfile.txt
cat textfile.txt | mail -s "test" fosiul@websolution4u.co.uk
and from /var/log/maillog sent me full log related to this email
or just grub last 10 log and attach here.
ASKER
now i have change settings of /etc/hosts like
10.50.0.6 mail.itcplant.com itc
61.16.236.202 mail.itcplant.com itc
than mail is going like alok@mail.itcplant.com.
Feb 14 21:17:06 localhost sendmail[18005]: n1EFl6IY018005: from=<alok@itcplant.com>, size=1121, class=0, nrcpts=1, msgid=<003a01c98e8c$cda6b4 f0$5903320 a@alok>, proto=SMTP, daemon=MTA, relay=[10.50.0.2]
Feb 14 21:17:06 localhost sendmail[18006]: n1EFl6IY018005: to=<alok@mail.itcplant.com >, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31289, dsn=2.0.0, stat=Sent
Feb 14 21:17:18 localhost dovecot: pop3-login: Login: user=<alok>, method=PLAIN, rip=::ffff:10.50.0.2, lip=::ffff:10.50.0.6
Feb 14 21:17:19 localhost dovecot: POP3(alok): Disconnected: Logged out top=0/0, retr=1/1374, del=1/1, size=1357
10.50.0.6 mail.itcplant.com itc
61.16.236.202 mail.itcplant.com itc
than mail is going like alok@mail.itcplant.com.
Feb 14 21:17:06 localhost sendmail[18005]: n1EFl6IY018005: from=<alok@itcplant.com>, size=1121, class=0, nrcpts=1, msgid=<003a01c98e8c$cda6b4
Feb 14 21:17:06 localhost sendmail[18006]: n1EFl6IY018005: to=<alok@mail.itcplant.com
Feb 14 21:17:18 localhost dovecot: pop3-login: Login: user=<alok>, method=PLAIN, rip=::ffff:10.50.0.2, lip=::ffff:10.50.0.6
Feb 14 21:17:19 localhost dovecot: POP3(alok): Disconnected: Logged out top=0/0, retr=1/1374, del=1/1, size=1357
ASKER
yes this server is behind Fortigate firewall and NATED TO local ip 10.50.0.6 in against of 61.16.236.202
Ok i just receivved email from your server
so its working.. fine
so its working.. fine
ASKER
Feb 14 21:23:49 localhost sendmail[18040]: n1EFrmnS018040: to=fosiul@websolution4u.co .uk, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30046, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n1EFrn69018041 Message accepted for delivery)
Feb 14 21:23:52 localhost sendmail[18043]: STARTTLS=client, relay=mail.websolution4u.c o.uk., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
rFeb 14 21:23:54 localhost sendmail[18043]: n1EFrn69018041: to=<fosiul@websolution4u.c o.uk>, ctladdr=<root@mail.itcplan t.com> (0/0), delay=00:00:05, xdelay=00:00:05, mailer=esmtp, pri=120340, relay=mail.websolution4u.c o.uk. [78.110.167.196], dsn=2.0.0, stat=Sent (n1EAJfds025789 Message accepted for delivery)
Feb 14 21:23:52 localhost sendmail[18043]: STARTTLS=client, relay=mail.websolution4u.c
rFeb 14 21:23:54 localhost sendmail[18043]: n1EFrn69018041: to=<fosiul@websolution4u.c
yes is fine
so whats the problem you having ??
so whats the problem you having ??
ASKER
if you are busy than no probs we will get in touch with you tomorrow.
ASKER
i am unable to send mail to other domain like gmail etc. relaying deyied message is coming.
ASKER
the message could not be send because receipent was rejected by server.server 61.16.236.202 protocol SMTP , server response 550.5.7.1 Relaying denied ip 10.50.0.2 name lookup failed port 25.
above is the message i am getting while sending mail to outside domain.
above is the message i am getting while sending mail to outside domain.
ASKER
Feb 14 21:49:57 localhost sendmail[18167]: n1EGJor2018167: from=<shoemaker@ishtihaar. com>, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[10.50.0.2]
Feb 14 21:50:05 localhost sendmail[18164]: n1EGJ320018164: lost input channel from [10.50.0.2] to MTA after mail
Feb 14 21:50:05 localhost sendmail[18164]: n1EGJ320018164: from=<wpcabinetry@moneymak ers.co.za> , size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[10.50.0.2]
is this server is sendmail spam mail or what is the log above? please suggest me.
Feb 14 21:50:05 localhost sendmail[18164]: n1EGJ320018164: lost input channel from [10.50.0.2] to MTA after mail
Feb 14 21:50:05 localhost sendmail[18164]: n1EGJ320018164: from=<wpcabinetry@moneymak
is this server is sendmail spam mail or what is the log above? please suggest me.
i will solve your one then will go
about relay denyed, gmail is thinking its a spam email ,
let me do some check on your Ip
about relay denyed, gmail is thinking its a spam email ,
let me do some check on your Ip
Ok i cant telnet your mail server
you need to open port in your firewall
you need to do portforward 25 and 110 to your mailserver pc
let me know when its done
you need to open port in your firewall
you need to do portforward 25 and 110 to your mailserver pc
let me know when its done
ASKER
how ?
ASKER
Ok
you have a firewall router right ??
where you isp line is connected
you need to do portforward from that firewall router to your mail server pc
in that router there would be an option call portforward
you have a firewall router right ??
where you isp line is connected
you need to do portforward from that firewall router to your mail server pc
in that router there would be an option call portforward
what is in Service, access, policy under firewall options ??
ASKER
i am able to telnet only 110 from outside of my lan.
ASKER
these are the option which i have and this firewall router connected to ISP.
Screenshot-1.png
Screenshot-2.png
Screenshot-3.png
Screenshot-4.png
Screenshot-1.png
Screenshot-2.png
Screenshot-3.png
Screenshot-4.png
have you done any changes ??
i can telnet now
telnet mail.itcplant.com 25
and telnet 61.16.236.202 25
try to sent email to gamil now
but there is a problem , the dns report say unable to lookup ip 10.50.0.2
do this
in /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
120.0.0.1 localhost.localdomain localhost
10.50.0.6 itcplant.com itc
61.16.236.202 itcplant.com itc
change this to bellow
# Do not remove the following line, or various programs
# that require network functionality will fail.
10.50.0.6 mail.itcplant.com localhost
i can telnet now
telnet mail.itcplant.com 25
and telnet 61.16.236.202 25
try to sent email to gamil now
but there is a problem , the dns report say unable to lookup ip 10.50.0.2
do this
in /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
120.0.0.1 localhost.localdomain localhost
10.50.0.6 itcplant.com itc
61.16.236.202 itcplant.com itc
change this to bellow
# Do not remove the following line, or various programs
# that require network functionality will fail.
10.50.0.6 mail.itcplant.com localhost
ASKER
Feb 14 22:41:28 localhost sendmail[18531]: n1EHBRVJ018531: ruleset=check_rcpt, arg1=<aloknet21@gmail.com> , relay=[10.50.0.2], reject=550 5.7.1 <aloknet21@gmail.com>... Relaying denied. IP name lookup failed [10.50.0.2]
Feb 14 22:41:29 localhost sendmail[18531]: n1EHBRVJ018531: from=<alok@itcplant.com>, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[10.50.0.2]
Feb 14 22:41:30 localhost dovecot: pop3-login: Login: user=<alok>, method=PLAIN, rip=::ffff:10.50.0.2, lip=::ffff:10.50.0.6
Feb 14 22:41:30 localhost dovecot: POP3(alok): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
when i try to send mail from another network this log result i found.
Router is connected through RIP version 2
Feb 14 22:41:29 localhost sendmail[18531]: n1EHBRVJ018531: from=<alok@itcplant.com>, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[10.50.0.2]
Feb 14 22:41:30 localhost dovecot: pop3-login: Login: user=<alok>, method=PLAIN, rip=::ffff:10.50.0.2, lip=::ffff:10.50.0.6
Feb 14 22:41:30 localhost dovecot: POP3(alok): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
when i try to send mail from another network this log result i found.
Router is connected through RIP version 2
have you changed the /etc/hosts ??
ASKER
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.50.0.6 mail.itcplant.com itc
done the above.
nothing change has been done yet to firewall.
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.50.0.6 mail.itcplant.com itc
done the above.
nothing change has been done yet to firewall.
Delelete this line
127.0.0.1 localhost.localdomain localhost
just keep
10.50.0.6 mail.itcplant.com itc
problem is, its unable to map internal ip with mail.itcplanet.com and its thinking its fraud so it saying it relay denyed
127.0.0.1 localhost.localdomain localhost
just keep
10.50.0.6 mail.itcplant.com itc
problem is, its unable to map internal ip with mail.itcplanet.com and its thinking its fraud so it saying it relay denyed
can you try to send email from your server directly without using outlook
sent email to your gmail account from server command prompt and sent me the log
cat /etc/hosts | mail -s "test" aloknet21@gmail.com
sent email to your gmail account from server command prompt and sent me the log
cat /etc/hosts | mail -s "test" aloknet21@gmail.com
ASKER
Feb 16 15:28:37 localhost sendmail[32148]: n1G9wb5b032148: to=aloknet21@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30171, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n1G9wb9J032149 Message accepted for delivery)
Feb 16 15:28:40 localhost sendmail[32151]: n1G9wb9J032149: to=<aloknet21@gmail.com>, ctladdr=<root@itcplant.com > (0/0), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120443, relay=gmail-smtp-in.l.goog le.com. [209.85.143.114], dsn=2.0.0, stat=Sent (OK 1234758278 22si95608tim.4)
i got the mail from root to gmail account.
Feb 16 15:28:40 localhost sendmail[32151]: n1G9wb9J032149: to=<aloknet21@gmail.com>, ctladdr=<root@itcplant.com
i got the mail from root to gmail account.
hi ya
sorry due to weakend i dindot able to answer
so you saying, you can sent email from root to gmail accouant
but not from another account righyt ??
sorry due to weakend i dindot able to answer
so you saying, you can sent email from root to gmail accouant
but not from another account righyt ??
ASKER
yes through root i am able to send mail to any domain but through outlook express i am unable.
Ok do to outlook express
you need to give permisison to sent email by using your serve
go to cd /etc
then vi aliases
suppose you have a user call fosiul, and you want him to sent email via domain abc.com
so you will have to add the entery lik ethis
fosiul: fosiul@abc.com
then save the file
type : newaliases
it will create new aliases
now go to : cd /etc/mail/
vi local-host-named
add your domain name here : abc.com
now restart sendmail
try now.. from outlook with that user
you need to give permisison to sent email by using your serve
go to cd /etc
then vi aliases
suppose you have a user call fosiul, and you want him to sent email via domain abc.com
so you will have to add the entery lik ethis
fosiul: fosiul@abc.com
then save the file
type : newaliases
it will create new aliases
now go to : cd /etc/mail/
vi local-host-named
add your domain name here : abc.com
now restart sendmail
try now.. from outlook with that user
ASKER
i have sent some configuration on your mail. please check.
its looks allright
have you tryed with alok username from outlook ??
currently, can you sent email from outlook by using root ??
have you tryed with alok username from outlook ??
currently, can you sent email from outlook by using root ??
ASKER
no it is giving error like your outbox do not have valid account specified. would you like to use your default account to send these messages?
i have configured root in outlook.
i have configured root in outlook.
ASKER
not able to send mail through alok user from outlook.
on the sendmail server, have you create user call alok with password ???
ASKER
yes
Ok can you explain me little bit,
what error you having to outlook
"no it is giving error like your outbox do not have valid account specified. would you like to use your default account to send these messages?"
can you post an screen shoot of this problem please
what error you having to outlook
"no it is giving error like your outbox do not have valid account specified. would you like to use your default account to send these messages?"
can you post an screen shoot of this problem please
ASKER
ASKER
attached
root-user.bmp
root-user.bmp
ASKER
for receiving there is no any problem. only facing problem in smtp.
omm
ok so you can received email for alok via outlook but you cant sent email
do you have this service saslauthd installed and running ??
the error log you saying for alok, from their its saying aloks@initt.com relaying deneyd
but you have put in /etc/aliases as alok: alok@itcplant.com
why this difference ??
ok so you can received email for alok via outlook but you cant sent email
do you have this service saslauthd installed and running ??
the error log you saying for alok, from their its saying aloks@initt.com relaying deneyd
but you have put in /etc/aliases as alok: alok@itcplant.com
why this difference ??
ASKER
i have another domain too i.e inttype.com
and configured with aloks@inttype.com
i was sending mail from alok@itcplant.com to aloks@inttype.com
so that screen shot is showing difference.
and configured with aloks@inttype.com
i was sending mail from alok@itcplant.com to aloks@inttype.com
so that screen shot is showing difference.
Ok from your outlook by using aloks@itcplant.com sent me an email
ASKER
sent
i received the email aloks@inttype.com
so whats the problem!!
your outlook can sent email via aloks@inttype.com so its sending email via your server
is nto it ??
so whats the problem!!
your outlook can sent email via aloks@inttype.com so its sending email via your server
is nto it ??
ASKER
no this is not my domain i am the user of other domain that i told you is inttype.com and i want to prepare setup for itcplant.com.
inttype.com is not under my control only i am the user of that.
still not going mail from itcplant.com and my id is alok@itcplant.com. mail should send via this route.
inttype.com is not under my control only i am the user of that.
still not going mail from itcplant.com and my id is alok@itcplant.com. mail should send via this route.
I am not confused!!
ok tel me something : the email you just sent me from aloks@inttype.com, is this email going via your mailserver ??
when you setup the accounts of aloks@inttype.com in outlook what mail server you used ?? is not this : mail.itcplant.com ??
ok tel me something : the email you just sent me from aloks@inttype.com, is this email going via your mailserver ??
when you setup the accounts of aloks@inttype.com in outlook what mail server you used ?? is not this : mail.itcplant.com ??
ASKER
no this is another server. this is not mail.itcplant.com
let me check something in my serrver
ASKER
ok
do you have this service running
do you have this service saslauthd installed and running ??
do you have this service saslauthd installed and running ??
ASKER
it was not running but started now.
you should have that service for outlook to send email
also
after putting aliase in /etc/aliases file
did you type : newaliases ??
if both yes, then try to send email now , it should work
also
after putting aliase in /etc/aliases file
did you type : newaliases ??
if both yes, then try to send email now , it should work
ASKER
yes i did this but still problem is same.
Ok
in outlook for alok@itcplant.com email address what mail server address you put ??
is this mail.itcplant.com or 10.50.0.6 ??
you are doing something wrong in your outlook ...
in outlook for alok@itcplant.com email address what mail server address you put ??
is this mail.itcplant.com or 10.50.0.6 ??
you are doing something wrong in your outlook ...
Ok
when you are trying to sent email from outlook via alok@itcplant.com
if its rejects , it will show an error on /var/log/maillog
can i see that error ??
it will say access denyed with Your IP and username
on the server do this : tail -f /var/log/maillog [ so you will see realtime log in their]
now try to send an email from out look by using alok@itcplant.com, and see what errro you see mailog file
past that error here
when you are trying to sent email from outlook via alok@itcplant.com
if its rejects , it will show an error on /var/log/maillog
can i see that error ??
it will say access denyed with Your IP and username
on the server do this : tail -f /var/log/maillog [ so you will see realtime log in their]
now try to send an email from out look by using alok@itcplant.com, and see what errro you see mailog file
past that error here
ASKER
attached the settings of outlook express. i have tried both mail.itcplant.com and 10.50.0.6
outlook1.bmp
outlook1.bmp
ASKER
Feb 16 23:14:12 localhost sendmail[18521]: n1GHiCZq018521: ruleset=check_rcpt, arg1=<aloks@inttype.com>, relay=[10.50.0.2], reject=550 5.7.1 <aloks@inttype.com>... Relaying denied. IP name lookup failed [10.50.0.2]
Feb 16 23:14:12 localhost sendmail[18521]: n1GHiCZq018521: from=<alok@itcplant.com>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=[10.50.0.2]
Feb 16 23:14:12 localhost dovecot: pop3-login: Login: user=<alok>, method=PLAIN, rip=::ffff:10.50.0.2, lip=::ffff:10.50.0.6
Feb 16 23:14:12 localhost dovecot: POP3(alok): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Feb 16 23:14:12 localhost sendmail[18521]: n1GHiCZq018521: from=<alok@itcplant.com>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=[10.50.0.2]
Feb 16 23:14:12 localhost dovecot: pop3-login: Login: user=<alok>, method=PLAIN, rip=::ffff:10.50.0.2, lip=::ffff:10.50.0.6
Feb 16 23:14:12 localhost dovecot: POP3(alok): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
ASKER
what is localhost sendmail[18521]: n1GHiCZq018521: ruleset=check_rcpt,?
ommm problme is your nslookup for the ip of 10.50.0.2
10.50.0.2 is this the IP of the sendmail server ??
if yes
then change the /etc/hosts
delete this
61.16.236.202 itcplant.com itc
and write this
10.50.0.2 itcplant.com localhost
see if this help
also give me 45 miniutees, need to pickup my child then will dig in to this more ..
10.50.0.2 is this the IP of the sendmail server ??
if yes
then change the /etc/hosts
delete this
61.16.236.202 itcplant.com itc
and write this
10.50.0.2 itcplant.com localhost
see if this help
also give me 45 miniutees, need to pickup my child then will dig in to this more ..
ASKER
no probs i have to also pickup my child. will catch you later. 10.50.0.2 is the local ip of firewall .
this is very interesting problem we are facing.
etc/hosts conf is fine.
my server's local ip is 10.50.0.6 maped to 61.16.236.202 at firewall.
this is very interesting problem we are facing.
etc/hosts conf is fine.
my server's local ip is 10.50.0.6 maped to 61.16.236.202 at firewall.
ASKER
yes it is working now. i have put now
10.50.0.2 mail.itcplant.com itc
in /etc/hosts
and working now....................... ..
Great thanks a lot!!!!!!!!!!!!!!!!!!!!111
will catch you later for iptables and spamassasin.
10.50.0.2 mail.itcplant.com itc
in /etc/hosts
and working now.......................
Great thanks a lot!!!!!!!!!!!!!!!!!!!!111
will catch you later for iptables and spamassasin.
hahaha
God!! good !!!
let me know if you need any help
God!! good !!!
let me know if you need any help
ASKER
i would need help to configure spamassasin later on today i am busy in shifting some system to different location so sorry for delay respose.
yesterday i had install mailscanner too on this system and working fine.
Any way how is your child? How old they are?
yesterday i had install mailscanner too on this system and working fine.
Any way how is your child? How old they are?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
From the Log it looks like
you have already setup dns entry for your domain.
so you need to setup mailserver at this address
mail 61.x.x.202 --- this is my ip which i want to assign for mail server.
How to setup send mail including iptables and spamassasin?
: have a look this one how to setup sendmail and spamassign
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch21_:_Configuring_Linux_Mail_Servers
also
http://www.redhat.com/magazine/025nov06/features/email/index.html
also http://www.brennan.id.au/12-Sendmail_Server.html
3.Is any antivirus required for server so that virus attack can stop?
You dont need any antivirus to fight with virusl
but avg antivirus give a free version for linux, you can have a loo