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 11th January 2015
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default Can't send emails with msmtp - domain name conflict

My domain name is xxxxx.org.uk and my machine is mybox.
I therefore put mybox.xxxx.xxx.xxx in /etc/myname.

my mail is sent by msmtp. This puts mybox.xxxxx.xxx.xxx as the sender which my isp's server rejects.

if I change myname to xxxxx.xxx.xxx, without mybox, the mail is ok but my machine has no name.

over the last 2 days i've fiddled endlessly with .msmtprc and /etc/hosts and googled whatever i can think of without improvement. Can anyone suggest a way to send emails while preserving my machine name?

Last edited by acampbell; 13th January 2015 at 11:07 AM. Reason: remove my data
Reply With Quote
  #2   (View Single Post)  
Old 11th January 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,033
Default

Hello, and welcome!

First, you may want to edit your initial post and redact your personally identifiable information. But, since you provided it, I'm able to see that your local computer "ithaca," when using your fully qualified domain name -- is not resolvable by an authoritative server on the Internet's Domain Name System (DNS). Because it isn't resolvable, that machine cannot be found on the Internet, and its responsible mailserver cannot be identified -- since there is no record of the domain, it doesn't have any MX mailserver records.

To see every type of DNS record for the higher level domain name's records, which do exist, remove "ithaca." from the front of the domain name and use:

$ dig <domain name> ANY

The MX record reports the mailserver used to email users @<domain name>. Note also, the reported status is "NOERROR" -- no errors during the query.

If you are using your ISP's nameservers, or other external nameservers, try the command, this time adding "ithaca." in front of your domain name. The response will show which nameservers at your ISP are authoritative, and the reported status will be "NXDOMAIN" - domain name not found. You'll also note, no MX record, since no records at all are available.
Reply With Quote
  #3   (View Single Post)  
Old 13th January 2015
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Many thanks for your reply. I do understand why the mail wasn't going out; the question was how to change the domain name of the mail to the correct format, without the machine name.

I eventually found a solution: I modified my mutt config to make mutt insert the correct header. This works ok.

I still don't understand why obsd insists on adding the machine name to the domain name. Linux doesn't do this. I tried making /etc/defaultdomain but no improvement.
Reply With Quote
  #4   (View Single Post)  
Old 13th January 2015
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 227
Default

I didn't pipe up because I don't know msmtp and its always annoying when someone's solution is "use something else that I like" but...

I've been messing with email myself and found openSMTPD to be dead simple. You can solve this issue with a simple "relay ... as @hostname" or "relay ... as user@hostname" and it rewrites the message header with the desired hostname.

I'm using multiple email accounts with multiple SMTP servers relaying through the local openSMTPD.

Tim.
Reply With Quote
  #5   (View Single Post)  
Old 13th January 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,033
Default

Quote:
Originally Posted by TronDD View Post
...I don't know msmtp...
Neither do I.
Quote:
Originally Posted by acampbell View Post
Linux doesn't do this.
True. OpenBSD isn't Linux, and how it accomplishes tasks is often quite different from what you're used to.

You didn't mention what version of OpenBSD you're running. At 5.6, OpenBSD switched from Sendmail to OpenSMTPd as its default MTA. If you're using the default MTA, and you're using 5.6, the configuration file TronDD mentions in his post will be /etc/mail/smtpd.conf and its applicable man page is smtpd.conf(5). If you're running an earlier -release and using the default MTA Sendmail, see /etc/mail/README for Sendmail configuration guidance.

Last edited by jggimi; 13th January 2015 at 06:59 PM. Reason: clarity - acampbell may not be using a default MTA
Reply With Quote
  #6   (View Single Post)  
Old 14th January 2015
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

I'm using 5.6. I'll look into openSMTP but probably after my broken right wrist has healed and my typing can use more than one left finger!

Actually everything is fine now that I'm using mutt to configure outgoing mail correctly.
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
mem address conflict in amd64 current shep OpenBSD General 3 24th January 2013 02:57 AM
ThinkPad T30 memory conflict opendaemon OpenBSD Installation and Upgrading 5 3rd June 2012 01:46 PM
Parsing emails with 'awk' and 'perl' J65nko Guides 1 24th February 2011 03:34 AM
Does pf conflict with OpenVPN? Emile OpenBSD Packages and Ports 37 2nd February 2011 11:03 PM
send files to email milo974 OpenBSD General 7 1st September 2008 02:03 PM


All times are GMT. The time now is 06:05 AM.


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