LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sendmail wont send to the internet. Local mail ok. (http://www.linuxquestions.org/questions/linux-newbie-8/sendmail-wont-send-to-the-internet-local-mail-ok-727343/)

themrrobert 05-20-2009 02:37 PM

Sendmail wont send to the internet. Local mail ok.
 
I am trying to get sendmail (my smtp server) to transport mail to outside internet addresses. We are getting a virtual server set up in the next few days, and it should work out of the box, but i need to get the local machine working to test it before uploading.

I can sendmail to other user accounts no problem, and (before i played with it) my main account (robert) could send mail, and this was the response it got: (but it didn't work before, it wont succeed in 5 days lol.)
Output from 2.6.27 kernel, latest sendmail in sid repos, default cfg, webmin installed.
Code:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  the.at.robert@gmail.com
    Mailing to remote domains not supported

------ This is a copy of the message, including all the headers. ------

Return-path: <root@xdeviant>
Received: from root by xdeviant with local (Exim 4.69)
        (envelope-from <root@xdeviant>)
        id 1M6sgd-00062P-Sh
        for the.at.robert@gmail.com; Wed, 20 May 2009 13:46:51 -0700
From: the.at.robert@gmail.comrobert
Message-Id: <E1M6sgd-00062P-Sh@xdeviant>
Date: Wed, 20 May 2009 13:46:51 -0700

Code:

Message contents       

    **********************************************
    **      THIS IS A WARNING MESSAGE ONLY      **
    **  YOU DO NOT NEED TO RESEND YOUR MESSAGE  **
    **********************************************

The original message was received at Tue, 19 May 2009 13:06:33 -0700
from localhost [127.0.0.1]

  ----- Transcript of session follows -----
the.at.robert@gmail.com... Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old


I have webmin, and i've already added robert to list of trusted users and restarted sendmail server.

Please help ^_^ I just want to send outgoing email!

themrrobert 05-20-2009 04:53 PM

Note: I don't know what else to do =( Added sendmail.mc file
I should mention that I have tried exim, xmail, sendmail and the one that starts with an f. None of them work. I have spent countless hours trying to configure them, but most of it should configure automatically with Debian.

I have tried on Debian Sid, Lenny, Ubuntu ( i can't tell which kind, i think heron. 8.4 or something. ) none will send email out. (By the way i've tried from three different ips with 3 different isps, all of which claim not to block any outbound traffic.

Code:

divert(-1)dnl
#-----------------------------------------------------------------------------
# $Sendmail: -----
#-----------------------------------------------------------------------------
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-4 2008-05-20 07:20:30 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=

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 # Be somewhat anal in what we allow MAYBE THIS?
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl

define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl

FEATURE(`use_cw_file')dnl

FEATURE(`access_db', , `skip')dnl

FEATURE(`greet_pause', `1000')dnl 1 seconds
FEATURE(`delay_checks', `friend', `n')dnl
define(`confBAD_RCPT_THROTTLE',`3')dnl

dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl

include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl

dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl


Undeadzz 05-20-2009 06:45 PM

I'm pretty sure the mail server that your mail server is sending mail to needs to accept it, which means you either have to get a certificate from verisign or some other company, or talk to the person who owns the upstream mail server to allow your server to send mail to theirs.

chrism01 05-21-2009 02:29 AM

I don't have my notes here, but I'm pretty sure you comment out the line with '127.0.0.1' in it.
Its a default security setting to only send to/from localhost. Has to be disabled, then re-generate sendmail.cf.

farslayer 05-21-2009 11:35 AM

So you intentionally installes sendmail on a Debian based system ? Why ? Sendmail is complex and difficult to configure, not a good choice if you are not familiar with it.

EXIM is the default smtp for Debian, and either EXIM or Postfix would be easier to configure than sendmail. Personally I prefer postfix because I am more familiar with it than exim, but I have used both successfully.

dpkg-reconfigure exim
choose Internet site - Done you should now be able to send and receive mail to the Internet..

With sendmail not so much.. I don't think the dpkg-reconfigure command works with that smtp server.


for best practices you should address the two following issues as well..

The hostname your mail server is identifying itself as is invalid - many mail servers will reject mail because of that, your server needs a alid hostname.
Quote:

Return-path: <root@xdeviant>
that should be someuser@deviant.com (or org, net, whatever.. ) it should be a valid address. that is my tipoff that your hostname isn' set properly


You should properly configured DNS HOST and rDNS records for your domain, or many mail servers will reject mail from you based on lack of those valid records.

repo 05-21-2009 02:24 PM

Quote:

plz vist freelinuxhelp.webs.com
please stop spamming

farslayer 05-21-2009 02:54 PM

repo did you report that ?

Looking at his post history, his last 7 posts have been spamming that site.. clearly a rules violation, and not very helpful either.

.

repo 05-21-2009 02:56 PM

Quote:

repo did you report that ?
yes

farslayer 05-22-2009 09:29 AM

Lots of how-to's for configuring sendmail.

http://rimuhosting.com/support/setti...p?mta=sendmail

http://www.linuxjournal.com/article/5507


Did you try the suggestion by chrism ? did it have any effect ?


All times are GMT -5. The time now is 03:42 PM.