LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   pine and sendmail (http://www.linuxquestions.org/questions/linux-software-2/pine-and-sendmail-868570/)

DBabo 03-14-2011 05:00 PM

pine and sendmail
 
Guys,
probably this is trivial, can't find the right resource thou...
i have ISP's provided email address and i configured pine to use ISP's smtp server. Which is all good, but if and when i need to send a big email - i have to wait until file transfers over the network - which is pain.

How can i configure pine and sendmail(?) to use local's machine ( centos 5.2) sendmail(?) to be able to give the file to sendmail and continue to work in pine while it's working on actual sending of the file.

Thank you.
can you please point me to the right resource ?

unSpawn 03-14-2011 05:46 PM

Configure Sendmail to use your ISP's mail server (search for the "smarthost" directive) then configure (al)pine to use Sendmail as mail server.

DBabo 03-16-2011 11:57 AM

after spending 1/2 a day trying to relay to gmail i realized that the port is block by optonline.net. Doh. feel silly.
So now i'm trying to configure sendmail to relay using the mail.optonline.net. And it's not going well.
Here is the log and config file. I'm out of ideas at this point and any suggestion(s) are very welcomed.
Code:

[root@vmhost mail]# grep -v ^dnl ./sendmail.mc
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`SMART_HOST', `[mail.optonline.net]')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/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,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confTO_IDENT', `0')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
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_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

the client-info file is :
Code:

cd auth
[root@vmhost auth]# ls -l
total 16
-rw------- 1 root root    58 Mar 15 22:41 client-info
-rw------- 1 root root 12288 Mar 15 22:41 client-info.db
[root@vmhost auth]# cat ./client-info
AuthInfo:mail.optonline.net "U:root" "I:my_username_on_optonline.net" "P:mypassword"

an attempt to send an email. Not sure why it sends it to localhost and what user "az" has to do with all this - i'm "root" now.
Code:

[root@vmhost mail]# sendmail -v fake_email@optonline.net
buba
real pain
.
fake_email@optonline.net... Connecting to [127.0.0.1] via relay...
220 vmhost.home ESMTP Sendmail 8.13.8/8.13.8; Wed, 16 Mar 2011 12:54:51 -0400
>>> EHLO vmhost.home
250-vmhost.home Hello localhost [127.0.0.1] (may be forged), pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
>>> MAIL From:<az@vmhost.home> SIZE=15 AUTH=az@vmhost.home
250 2.1.0 <az@vmhost.home>... Sender ok
>>> RCPT To:<fake_email@optonline.net>
>>> DATA
250 2.1.5 <fake_email@optonline.net>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 p2GGspqZ003541 Message accepted for delivery
fake_email@optonline.net... Sent (p2GGspqZ003541 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 vmhost.home closing connection

and attempt to send an email as (local) user "az":
Code:

Date: Wed, 16 Mar 2011 08:53:38 -0400
From: Mail Delivery Subsystem <MAILER-DAEMON@vmhost.home>
To: az@vmhost.home
Subject: Returned mail: see transcript for details
Parts/Attachments:
  1  Shown    13 lines  Text
  2  Shown    331 bytes  Message, "Delivery Status"
  3  Shown    499 bytes  Message
  3.1 Shown      2 lines  Text
----------------------------------------

The original message was received at Wed, 16 Mar 2011 08:53:38 -0400
from localhost [127.0.0.1] (may be forged)

  ----- The following addresses had permanent fatal errors -----
<my_user@optonline.net>
    (reason: 550 5.1.8 invalid/host-not-in-DNS return address not allowed)

  ----- Transcript of session follows -----
... while talking to mail.optonline.net.:
>>> MAIL From:<az@vmhost.home> SIZE=469
<<< 550 5.1.8 invalid/host-not-in-DNS return address not allowed
554 5.0.0 Service unavailable

the /etc/hosts* are:
Code:

cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1              vmhost.home    vmhost
#127.0.0.1              localhost.localdomain localhost
::1            localhost6.localdomain6 localhost6
192.168.1.204  server
10.0.2.15      vmhost.home    vmhost
[root@vmhost auth]# cat /etc/hosts.allow
#
# hosts.allow  This file describes the names of the hosts which are
#              allowed to use the local INET services, as decided
#              by the '/usr/sbin/tcpd' server.
#
ALL:127.0.0.1


DBabo 03-16-2011 12:30 PM

aha! partially problem was resolved with adding :
Code:

MASQUERADE_AS(`optonline.net')dnl
to sendmail.mc
now the the return address is <user_on_local_machine>@optonline.net
now i can send the emails out. And i also so the article/blog on how to change this behavior and "map" local user(s) to the "correct" ones.

DBabo 03-17-2011 09:47 PM

I'm marking this as resolved since the main objective ( to be able to send the email out wo connecting directly to gmail) was solved.
Note to myself : do NOT use sendmail. Look into postfix and qmail.

unSpawn 03-23-2011 11:22 AM

Kinda late but still well done for solving this yourself and posting back your fix.


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