DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th August 2008
milo974 milo974 is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 58
Question send files to email

Hello,

At work, we ve firewall : openbsd 4.3 with PF. By default, MTA is Sendmail.
I want for example use that :
mail wesleym@wanadoo.fr < /etc/pf.conf

Actually, it doesnt work. How can i send mail to external domains ? (using root account)

thank's
Reply With Quote
  #2   (View Single Post)  
Old 6th August 2008
milo974 milo974 is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 58
Default

when im loocking to my maillog file :

Aug 6 15:40:03 bsdgate sendmail[462]: m76Be2dN000462: from=wesley, size=2823, class=0, nrcpts=1, msgid=<200808061140.m76Be2d
N000462@bsdgate.firewall.lan>, relay=root@localhost
Aug 6 15:40:03 bsdgate sendmail[462]: m76Be2dN000462: to=wesleym@aise-informatique.com, ctladdr=wesley (1000/1000), delay=00
:00:01, xdelay=00:00:00, mailer=relay, pri=32823, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused
by [127.0.0.1]

can you help me please
Reply With Quote
  #3   (View Single Post)  
Old 6th August 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Giving FreeBSD advice is not helpful DutchDaemon..

1) Sendmail is enabled by default on OpenBSD.
2) OpenBSD doesn't use System V style rc.d scripts, it uses BSD style rc.conf instead.

Again, OpenBSD != FreeBSD.. please take that into consideration before you post, such instructions only serve to confuse new users.

In this case, I believe the OP may have incorrectly configured PF.. please post your pf.conf file here in [code][/code] blocks.
Reply With Quote
  #4   (View Single Post)  
Old 6th August 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,052
Default

Sendmail appears to be running, and it appears outgoing transmissions may be blocked.

In OpenBSD, the default configuration for sendmail is described in the afterboot(8) man page, recommended by the "Welcome to OpenBSD" letter in /var/mail/root. It says:
Quote:
OpenBSD ships with a default /etc/mail/localhost.cf file that will work
for simple installations; it was generated from openbsd-localhost.mc in
/usr/share/sendmail/cf. Please see /usr/share/sendmail/README and
/usr/share/doc/smm/08.sendmailop/op.me for information on generating your
own sendmail configuration files. For the default installation, sendmail
is configured to only accept connections from the local host and to not
accept connections on any external interfaces. This makes it possible to
send mail locally, but not receive mail from remote servers, which is
ideal if you have one central incoming mail machine and several clients.
To cause sendmail to accept external network connections, modify the
sendmail_flags variable in /etc/rc.conf.local to use the
/etc/mail/sendmail.cf file in accordance with the comments therein. This
file was generated from openbsd-proto.mc.

Note that sendmail now also listens on port 587 by default. This is to
implement the RFC 2476 message submission protocol. You may disable this
via the no_default_msa option in your sendmail .mc file. See
/usr/share/sendmail/README for more information.
In order to participate in Internet mail, as milo wishes to do, his ISP must permit outgoing SMTP traffic, and the receiving Mail Transfer Agent must be willing to accept the traffic from milo's IP address. In today's e-mail world, neither of these will be certain. In current anti-spam practice, ISPs often block outbound SMTP traffic from non-commercial broadband and dial up customer pools, and, many MTAs use block lists to prevent inbound traffic from those pools, even if the ISPs permit the traffic.

Because the maillog does not show a REJECT, my assumption is blocked SMTP traffic.

A simple test is possible. I am behind a corporate firewall, so cannot use dig(1) to find the MX records for aise-informatique.com. So, milo, use dig:
$ dig aise-informatique MX (I can't run it to check, see the man page if this doesn't work for you.)
After obtaining the MTA(s) IP address(es), use telnet to prove or disprove a connection issue:
$ telnet <address> 25
is all that is needed. If milo gets "connection refused" or a hang with no connection at all, that would be a network block. If the connection completes, then there might be a sendmail configuration issue.

Last edited by jggimi; 6th August 2008 at 03:23 PM.
Reply With Quote
  #5   (View Single Post)  
Old 7th August 2008
roundkat roundkat is offline
Shell Scout
 
Join Date: May 2008
Posts: 115
Default

It looks like you don't really understand sendmail ..
That's OK .. I don't either..

I would suggest installing the Postfix package..
It tells you what to do after installation..

If you only want to "send out" then you won't have to configure
anything.. just install it..

Caveat:
Depending on your type of connection your ISP may block port 25
which means that you would have to configure a relayhost.

Example:
In Oklahoma we used to have a Cox residential account that blocks incoming and outgoing smtp (port 25)
I needed to send system messages from my OpenBSD firewall to my work address.

Code:
# vi /etc/postfix/main.cf

relayhost = [smtp.central.cox.net]

#postfix reload
The email was relayed via Cox's smtp servers to my work email address..

hth
rk
__________________
All posts sent on ReCycled Electrons...

Last edited by roundkat; 7th August 2008 at 02:49 AM.
Reply With Quote
  #6   (View Single Post)  
Old 7th August 2008
milo974 milo974 is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 58
Default

thank's Jggimi, it works ! i ve only modify rc.conf.
Reply With Quote
  #7   (View Single Post)  
Old 7th August 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,052
Default

Quote:
Originally Posted by milo974 View Post
thank's Jggimi, it works ! i ve only modify rc.conf.
I'm not sure what you did to make things work for you, but I'm glad you got things working.

NOTE:

The rc.conf(5) man page describes best practice:
Quote:
It is advisable to leave the /etc/rc.conf file untouched, and instead
create and edit a new /etc/rc.conf.local file. Variables set in this
file will override variables previously set in /etc/rc.conf.
If you use rc.conf.local, you will not have to manually edit rc.conf when you upgrade OpenBSD.
Reply With Quote
  #8   (View Single Post)  
Old 1st September 2008
Sabbel Sabbel is offline
Port Guard
 
Join Date: Sep 2008
Posts: 11
Default

Quote:
Originally Posted by milo974 View Post
thank's Jggimi, it works ! i ve only modify rc.conf.
Hi milo,

what do you do? Can you please post the changes do you make?

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email and SASL JMJ_coder General software and network 3 8th February 2009 05:09 AM
To Administrators: I am not getting any email notifications php111 Feedback and Suggestions 4 28th October 2008 01:17 PM
Mutt not sending email cssgalactic FreeBSD General 4 3rd July 2008 09:54 PM
Send email to all local users cajunman4life FreeBSD General 8 15th June 2008 10:52 AM
Using mail(1) and send-pr(1) from dial-up and private address machines. robbak Guides 0 1st May 2008 07:02 AM


All times are GMT. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick