Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sendmail woes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
musicalDuck
n00b
n00b


Joined: 30 Jun 2005
Posts: 45

PostPosted: Thu Sep 29, 2005 9:09 am    Post subject: Sendmail woes Reply with quote

Hi

I have to setup sendmail to work for one of my applications.

The thing is I am behind several firewalls and I have no static IP or dyn-dns. I therefore need to setup masquerading but I can't seem to get it right as sendmail aways sends my local address, which the recipitant rightly rejects.

Here's my info

/etc/mail/sendmail.mc

Code:

divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
#       All rights reserved.
# Copyright (c) 1983 Eric P. Allman.  All rights reserved.
# Copyright (c) 1988, 1993
#       The Regents of the University of California.  All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
define(`confDEF_USER_ID',``8:12'')dnl
VERSIONID(`$Id: sendmail.mc,v 1.2 2002/07/04 04:55:29 g2boojum Exp $')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
define(`SMART_HOST',`esmtp:mail.myisp.com')dnl
FEATURE(`masquerade_envelope')dnl
MASQUERADE_AS(`myisp.com')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
FEATURE(`local_procmail')dnl
define(`PROCMAIL_MAILER_FLAGS',`procmail -Y -m $h $g $u')dnl
define(`PROCMAIL_MAILER_ARGS',`procmail -Y -m $h $g $u')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
MAILER(procmail)dnl
MAILER(local)dnl
MAILER(smtp)dnl
Cw localhost.localdomain


Output of mail attempt

Code:

server ~ # sendmail -v me@myisp.com < spam.txt
me@myisp.com... Connecting to [127.0.0.1] via relay...
220 server.mylocaldomain ESMTP Sendmail 8.13.4/8.13.4; Thu, 29 Sep 2005 12:29:51 +0200
>>> EHLO server.mylocaldomain
250-server.mylocaldomain Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<root@server.mylocaldomain> SIZE=587
250 2.1.0 <root@server.mylocaldomain>... Sender ok
>>> RCPT To:<me@myisp.com>
>>> DATA
250 2.1.5 <me@myisp.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <me@myisp.com>... Connecting to mail.myisp.com. via esmtp...
050 220 someserver.myisp.com ESMTP Exim 4.51 Thu, 29 Sep 2005 10:32:09 +0200
050 >>> EHLO server.mylocaldomain
050 250-someserver.myisp.com Hello server.mylocaldomain [xxx.xxx.xxx.xxx]  <- My routers dynamic IP
050 250-SIZE 31457280
050 250-ETRN
050 250-PIPELINING
050 250-AUTH LOGIN PLAIN
050 250 HELP
050 >>> MAIL From:<root@server.mylocaldomain> SIZE=833
050 550-Verification failed for <root@server.mylocaldomain>
050 550-Unrouteable address
050 550 Sender verify failed
050 <root@server.mylocaldomain>... Connecting to local...
050 <root@server.mylocaldomain>... Sent
250 2.0.0 j8TATpeh000535 Message accepted for delivery
me@myisp.com... Sent (j8TATpeh000535 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server.mylocaldomain closing connection


Command to convert config file

Code:

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf


Command to restart sendmail

Code:

/etc/init.d/sendmail restart


Basically I just need sendmail because on of my programs needs it to send files to one of my emails

Any help would be greatly apreciated
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Sep 29, 2005 12:48 pm    Post subject: Reply with quote

Dump sendmail and install postfix.

It is a gazillion degrees easier to set up ;-)
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
musicalDuck
n00b
n00b


Joined: 30 Jun 2005
Posts: 45

PostPosted: Thu Sep 29, 2005 1:55 pm    Post subject: woe is me Reply with quote

I know but I have to have sendmail for this app. Tis sad

Any thoughts?
Back to top
View user's profile Send private message
DaveArb
Guru
Guru


Joined: 29 Apr 2004
Posts: 510
Location: Texas, USA

PostPosted: Thu Sep 29, 2005 2:04 pm    Post subject: Re: Sendmail woes Reply with quote

musicalDuck wrote:
Code:
>>> MAIL From:<root@server.mylocaldomain> SIZE=587


From the Bat Book:
"Some users (such as root) should never be masqueraded because one always needs to know their machine of origin."

adaptr wrote:
It is a gazillion degrees easier to set up

:lol:

Dave
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Sep 29, 2005 2:06 pm    Post subject: Reply with quote

Quote:
Basically I just need sendmail because on of my programs needs it to send files to one of my emails

That is not true; the program needs the sendmail interface, and every MTA offers that, for compatibility.

Read up on it.
If the program can only work with the actual sendmail binary then it is a shoddy program.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
musicalDuck
n00b
n00b


Joined: 30 Jun 2005
Posts: 45

PostPosted: Thu Sep 29, 2005 2:41 pm    Post subject: kk Reply with quote

Thanx

I am still a bit of a n00b with mailer stuffses. ATM I am trying to get the fax to email thing working in asterisk. It runs through a script that is written for sendmail (I think sendmail is used everywhere in asterisk anyway).
Are you saying that I can use another program to get a sendmail like effect going? It needs to be similar enough so that can use the same fax-email script (maybe modify it slightly).

Which programs would you recommend?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Sep 29, 2005 2:50 pm    Post subject: Reply with quote

Exim, Postfix, Qmail, all three offer sendmail binary compatibility.
My favourite is Exim, but I've used Postfix too - both very configurable.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
musicalDuck
n00b
n00b


Joined: 30 Jun 2005
Posts: 45

PostPosted: Mon Oct 03, 2005 7:15 am    Post subject: thanx Reply with quote

K thanx for all the help guys, installing exim as we speak!

Have one on me ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum