Gentoo Archives: gentoo-user

From: Harry Putnam <reader@×××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] [OT] sendmail relay to gmail smtp server
Date: Tue, 27 Dec 2011 15:59:12
Message-Id: 87mxae6mbi.fsf@newsguy.com
1 NOTE: Sorry if I've gone sort of hog wild posting this question
2 various places but it is a perplexing problem and I suspect there may
3 be help available here. Not to mention that many groups are slow due
4 to Christmas holidays.
5
6 ------- --------- ---=--- --------- --------
7
8 First let me say, I'm not interested in switching mta's, just incase
9 someone feels like posting the usual, `hey switch to NAME OF MTA' type
10 post.
11
12 I want to use gmails' smtp server as Smart Host for my single user
13 linux box running sendmail-8.14.4
14
15 I'm hooked up to an ISP called direcpath.tv in Atlanta that uses gmail
16 smtp servers for its clients with addresses like reader@×××××××××.tv
17
18 They have terrible to non-existent support and no support of linux/sendmail
19
20 They use smtp.gmail.com But before I get into the extra complication
21 of their direcpath.tv overlay, and since I do have a normal gmail
22 account I thought I'd first try to get the authentication for smtp
23 working for that username. hputnam3@×××××.com
24
25 So after dozens of small edits and restarts and makemaps ... cutting
26 to the chase:
27
28 /etc/mail/authinfo
29
30 (password obfuscated)
31 ,----
32 | Athinfo:smtp.gmail.com "U:root" "I:hputnam3@×××××.com" "P:??XX??" "M: LOGIN PLAIN"
33 | Athinfo:smtp.gmail.com:587 "U:root" "I:hputnam3@×××××.com" "P:??XX??" "M: LOGIN PLAIN"
34 `----
35
36 ------- --------- ---=--- --------- --------
37
38 And I think what are the most relevant sendmail.mc settings (the whole
39 *mc is inlined at the end).
40
41 /etc/mail/sendmail.mc
42
43 ,----
44 | define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
45 | define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
46 |
47 | FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
48 |
49 | define(`confAUTH_MECHANISMS',`EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
50 | TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
51 |
52 | define(`SMART_HOST',`smtp.gmail.com')dnl
53 `----
54
55 (And for the record, I did try bracketing the Smart Host like:
56 define(`SMART_HOST',`[smtp.gmail.com]')dnl)
57
58 I have some old masquerade settings that I doubt are causing a
59 problem. I do have an account with them too. I think the error would
60 be different if they were causing problems, but here those are:
61
62 (Note, that removing those only gets the same error messages)
63 ,----
64 | MASQUERADE_AS(`newsguy.com')dnl
65 | FEATURE(`allmasquerade')dnl
66 | FEATURE(`masquerade_envelope')dnl
67 | dnl # [HP 111006_211813 Testing local_no_masquerade #]dnl
68 | FEATURE(`local_no_masquerade')dnl
69 `----
70
71 ------- --------- ---=--- --------- --------
72
73 Relevant verbose smtp logs:
74 ,----
75 | 050 >>> EHLO reader.local.lan
76 | 050 250-mx.google.com at your service, [65.50.57.227]
77 | 050 250-SIZE 35882577
78 | 050 250-8BITMIME
79 | 050 250-AUTH LOGIN PLAIN XOAUTH
80 | 050 250 ENHANCEDSTATUSCODES
81 | 050 >>> MAIL From:<reader@×××××××.com> SIZE=563 AUTH=<>
82 | 050 530-5.5.1 Authentication Required. Learn more at
83 | 050 530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 py4sm63515568igc.2
84 `----
85
86 The `learn more' address given just above is not all that helpful.
87
88 ------- --------- ---=--- --------- --------
89
90 I think these are the sendmail logs that contain the relevant error:
91
92 (I'm not sure if the `verify=FAIL' means what it suggests)
93
94 ,----
95 | Dec 26 21:41:38 reader sm-mta[24243]: STARTTLS=client,
96 | relay=smtp.gmail.com, version=TLSv1/SSLv3, verify=FAIL,
97 | cipher=RC4-SHA, bits=128/12
98 |
99 | Dec 26 21:41:38 reader sm-mta[24243]: pBR2fbLX024243:
100 | to=<reader@×××××××.com>, ctladdr=<reader@××××××××××××.lan>
101 | (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30563,
102 | relay=smtp.gmail.com [209.85.225.109], dsn=5.0.0,
103 | stat=Service unavailable
104 |
105 | Dec 26 21:41:38 reader sm-mta[24243]: pBR2fbLX024243: pBR2fbLY024243: DSN: Service unavailable
106 `----
107
108 ------- --------- ---=--- --------- --------
109
110 Full sendmail.mc
111
112 divert(-1)dnl
113 divert(0)dnl
114 define(`_USE_ETC_MAIL_')dnl
115 include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
116 VERSIONID(`$Id: current.mc,v 1.13 2011/12/26 17:38:01 reader Exp $')
117 OSTYPE(`debian')dnl
118 DOMAIN(`debian-mta')dnl
119 undefine(`confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS=
120
121 define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
122 define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
123 define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
124
125 FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
126 FEATURE(`access_db',`hash -T<TMPF> /etc/mail/access.db')dnl
127 define(`confAUTH_MECHANISMS',`EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
128 TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
129 define(`SMART_HOST',`smtp.gmail.com')dnl
130 FEATURE(`access_db',`hash -T<TMPF> /etc/mail/access.db')dnl
131
132 FEATURE(`no_default_msa')dnl
133 DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
134 DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
135 define(`confPRIVACY_FLAGS', `needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
136 define(`confCONNECTION_RATE_THROTTLE', `15')dnl
137 define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
138 FEATURE(`use_cw_file')dnl
139 FEATURE(`greet_pause', `1000')dnl 1 seconds
140 FEATURE(`delay_checks', `friend', `n')dnl
141 define(`confBAD_RCPT_THROTTLE',`3')dnl
142 FEATURE(`conncontrol', `nodelay', `terminate')dnl
143 FEATURE(`ratecontrol', `nodelay', `terminate')dnl
144 include(`/etc/mail/m4/dialup.m4')dnl
145 include(`/etc/mail/m4/provider.m4')dnl
146
147 FEATURE(`always_add_domain')dnl
148 MASQUERADE_AS(`newsguy.com')dnl
149 FEATURE(`allmasquerade')dnl
150 FEATURE(`masquerade_envelope')dnl
151 FEATURE(`local_no_masquerade')dnl
152
153 EXPOSED_USER(`root')dnl
154
155 MAILER_DEFINITIONS
156 MAILER(`local')dnl
157 MAILER(procmail)dnl
158 MAILER(`smtp')dnl

Replies

Subject Author
Re: [gentoo-user] [OT] sendmail relay to gmail smtp server Mick <michaelkintzios@×××××.com>