Gentoo Archives: gentoo-user

From: Michael Sullivan <michael@××××××××××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: [gentoo-user] Re: OT - Can't send mail from non-root accounts [SOLVED]
Date: Sat, 07 Jul 2007 15:43:57
Message-Id: 1183822401.11170.2.camel@camille.espersunited.com
In Reply to: [gentoo-user] OT - Can't send mail from non-root accoutns by Michael Sullivan
1 On Fri, 2007-07-06 at 10:39 -0500, Michael Sullivan wrote:
2 > I have three computers:
3 >
4 > baby.espersunited.com (192.168.1.2)
5 > camille.espersunited.com (192.168.1.3)
6 > catherine.espersunited.com (192.168.1.4)
7 >
8 > camille and catherine are running ssmpt:
9 >
10 > camille ~ # emerge -pv ssmtp
11 >
12 > These are the packages that would be merged, in order:
13 >
14 > Calculating dependencies... done!
15 > [ebuild R ] mail-mta/ssmtp-2.61-r2 USE="ipv6 ssl -mailwrapper
16 > -md5sum" 53 kB
17 >
18 > Total: 1 package (1 reinstall), Size of downloads: 53 kB
19 >
20 >
21 > catherine ~ # emerge -pv ssmtp
22 >
23 > These are the packages that would be merged, in order:
24 >
25 > Calculating dependencies... done!
26 > [ebuild R ] mail-mta/ssmtp-2.61-r2 USE="ipv6 ssl -mailwrapper
27 > -md5sum" 53 kB
28 >
29 > Total: 1 package (1 reinstall), Size of downloads: 53 kB
30 >
31 >
32 > baby is running exim:
33 >
34 > baby ~ # emerge -pv exim
35 >
36 > These are the packages that would be merged, in order:
37 >
38 > Calculating dependencies... done!
39 > [ebuild R ] mail-mta/exim-4.67 USE="exiscan exiscan-acl ldap mysql
40 > pam perl sasl ssl syslog tcpd -X -dnsdb -domainkeys -dovecot-sasl
41 > -gnutls -ipv6 -lmtp -mailwrapper -mbox -mbx -nis -postgres -radius -spf
42 > -sqlite -srs" 0 kB
43 >
44 > Total: 1 package (1 reinstall), Size of downloads: 0 kB
45 >
46 >
47 >
48 > camille ~ # emerge -pv ssmtp
49 >
50 > These are the packages that would be merged, in order:
51 >
52 > Calculating dependencies... done!
53 > [ebuild R ] mail-mta/ssmtp-2.61-r2 USE="ipv6 ssl -mailwrapper
54 > -md5sum" 53 kB
55 >
56 > Total: 1 package (1 reinstall), Size of downloads: 53 kB
57 > camille ~ # cat /etc/ssmtp/revaliases
58 > # sSMTP aliases
59 > #
60 > # Format: local_account:outgoing_address:mailhub
61 > #
62 > # Example: root:your_login@××××.domain:mailhub.your.domain[:port]
63 > # where [:port] is an optional port number that defaults to 25.
64 > #
65 > michael:michael@baby:baby.espersunited.com
66 > root:root@baby:baby.espersunited.com
67 > postmaster:root@baby:baby.espersunited.com
68 >
69 >
70 >
71 > catherine ~ # cat /etc/ssmtp/revaliases
72 > # sSMTP aliases
73 > #
74 > # Format: local_account:outgoing_address:mailhub
75 > #
76 > # Example: root:your_login@××××.domain:mailhub.your.domain[:port]
77 > # where [:port] is an optional port number that defaults to 25.
78 > #
79 > root:root@baby:baby.espersunited.com
80 > amy@catherine:amy@baby:baby.espersunited.com
81 >
82 >
83 > Here is baby's exim.conf:
84 >
85 > baby ~ # cat /etc/exim/exim.conf | sed '/#/ d'
86 >
87 > domainlist local_domains = @ : espersunited.com :
88 > baby.espersunited.com : localhost : localdomain :
89 > camille.espersunited.com : catherine.espersunited.com : camille :
90 > catherine
91 > domainlist relay_to_domains =
92 > hostlist relay_from_hosts = 127.0.0.1 : 192.168.1.2 : 192.168.1.3 :
93 > 192.168.1.4
94 > acl_smtp_rcpt = acl_check_rcpt
95 > acl_smtp_data = acl_check_data
96 > acl_smtp_mime = acl_check_mime
97 > av_scanner = clamd:/tmp/clamd
98 > spamd_address = 127.0.0.1 783
99 > qualify_domain = espersunited.com
100 > never_users = root
101 > host_lookup = *
102 > rfc1413_hosts = *
103 > rfc1413_query_timeout = 5s
104 > sender_unqualified_hosts = baby.espersunited.com :
105 > camille.espersunited.com : catherine.espersunited.com :
106 > localhost.localdomain
107 > recipient_unqualified_hosts = baby.espersunited.com :
108 > camille.espersunited.com : catherine.espersunited.com :
109 > localhost.localdomain
110 > ignore_bounce_errors_after = 2d
111 > timeout_frozen_after = 7d
112 > begin acl
113 > acl_check_rcpt:
114 > accept hosts = :
115 > deny message = Restricted characters in address
116 > domains = +local_domains
117 > local_parts = ^[.] : ^.*[@%!/|]
118 > deny message = Restricted characters in address
119 > domains = !+local_domains
120 > local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
121 > accept local_parts = postmaster
122 > domains = +local_domains
123 > require verify = sender
124 > accept hosts = +relay_from_hosts
125 > control = submission
126 > accept authenticated = *
127 > control = submission
128 > require message = relay not permitted
129 > domains = +local_domains : +relay_to_domains
130 > require verify = recipient
131 > accept
132 > acl_check_data:
133 > warn message = X-SpamScore: $spam_score ($spam_bar)
134 > spam = nobody:true
135 > warn message = X-SpamReport: $spam_report
136 > spam = nobody:true
137 > warn message = X-Spam-Flag: ${if \
138 > >{$spam_score_int}{58}{Almost Certainly}\
139 > {${if >{$spam_score_int}{55}{Probably}\
140 > {${if >{$spam_score_int}{50}{Possibly}{Doubtful}\
141 > }}}}}
142 > spam = nobody
143 > warn message = Subject: [*SPAM*] $h_Subject ${if \
144 > >{$spam_score_int}{58}{Almost Certainly}\
145 > {${if >{$spam_score_int}{55}{Probably}\
146 > {${if >{$spam_score_int}{50}{Possibly}{Doubtful}\
147 > }}}}}
148 > spam = nobody
149 > accept
150 > acl_check_mime:
151 > warn decode = default
152 > deny message = Blacklisted file extension detected
153 > condition = ${if match \
154 > {${lc:$mime_filename}} \
155 > {\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com|.vbs)$\N} \
156 > {1}{0}}
157 > accept
158 > acl_check_content:
159 > deny message = Serious MIME defect detected ($demime_reason)
160 > demime = *
161 > condition = ${if >{$demime_errorlevel}{2}{1}{0}}
162 > deny message = This message contains malware ($malware_name)
163 > malware = *
164 > warn message = X-Spam-Score: $spam_score ($spam_bar)
165 > spam = nobody:true
166 > warn message = X-Spam-Report: $spam_report
167 > spam = nobody:true
168 > warn message = Subject: [*SPAM*] $h_Subject
169 > spam = nobody
170 > deny message = This message scored $spam_score points.
171 > Congratulations!
172 > spam = nobody:true
173 > condition = ${if >{$spam_score_int}{50}{1}{0}}
174 > accept
175 > begin routers
176 > dnslookup:
177 > driver = dnslookup
178 > domains = ! +local_domains
179 > transport = remote_smtp
180 > ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
181 > no_more
182 > system_aliases:
183 > driver = redirect
184 > allow_fail
185 > allow_defer
186 > data = ${lookup{$local_part}lsearch{/etc/mail/aliases}}
187 > file_transport = address_file
188 > pipe_transport = address_pipe
189 > userforward:
190 > driver = redirect
191 > check_local_user
192 > file = $home/.forward
193 > no_verify
194 > no_expn
195 > check_ancestor
196 > file_transport = address_file
197 > pipe_transport = address_pipe
198 > reply_transport = address_reply
199 > localuser:
200 > driver = accept
201 > check_local_user
202 > transport = local_delivery
203 > cannot_route_message = Unknown user
204 > begin transports
205 > remote_smtp:
206 > driver = smtp
207 > local_delivery:
208 > driver = appendfile
209 > directory = /home/$local_part/.maildir
210 > maildir_format
211 > delivery_date_add
212 > envelope_to_add
213 > return_path_add
214 > address_pipe:
215 > driver = pipe
216 > return_output
217 > address_file:
218 > driver = appendfile
219 > delivery_date_add
220 > envelope_to_add
221 > return_path_add
222 > address_reply:
223 > driver = autoreply
224 > begin retry
225 > * * F,2h,15m; G,16h,1h,1.5; F,4d,6h
226 > begin rewrite
227 > begin authenticators
228 >
229 > The problem is that mail from michael on camille and from amy on
230 > catherine is not accepted:
231 >
232 > michael@camille ~ $ echo "This is a test" | mail -s "Test" michael
233 > send-mail: RCPT TO:<michael@camille> (550 Sender verify failed)
234 > Can't send mail: sendmail process failed with error code 1
235 >
236 >
237 > catherine ~ # echo "This is a test" | mail -s "Test" amy
238 > send-mail: RCPT TO:<amy@catherine> (550 Sender verify failed)
239 > Can't send mail: sendmail process failed with error code 1
240 >
241 >
242 > But mail from root on both boxes is accepted. I think this is probably
243 > exim being paranoid again, but I'm not sure how to fix it. Can anyone
244 > help me?
245 > -Michael Sullivan-
246
247 I fixed it. It wasn't exim - it was something messed up in
248 ssmtp.conf...
249
250 --
251 gentoo-user@g.o mailing list