Sponsored Content
Top Forums UNIX for Dummies Questions & Answers unix-mail to external websites/addresses Post 302094974 by BOFH on Thursday 2nd of November 2006 10:16:19 AM
Old 11-02-2006
In general you should be able to send a message to any server that accepts the incoming connection. You can see that it's working for local servers. Configuration issues at either server or in between can prevent the successful delivery of your message.

For example, if your unix server isn't in DNS and the ParentCompany server will only accept e-mail from DNS resolvable systems, your incoming connection will not be accepted.

Many viruses set up a mini smtp server on the Windows workstation which churns out spam/virus e-mails. I've configured our network to refuse to allow port 25 connections from any workstation not specifically configured as a mail transfer agent.

You can test these by attempting a connection manually

Code:
$ telnet parentcompany.com 25

If you don't get anything (generally a banner of some sort is displayed), you're probably being blocked at your local company firewall. If you get a banner, you can try to build a session and see what happens:

Code:
$ telnet parentcompany.com 25
220 mail.parentcompany.com ESMTP Postfix
HELO abccompany.com
250 Hello abccompany.com
MAIL FROM: <joy.k@abccompany.com>
250 Ok
RCPT TO: <my.friend@parentcompany.com>
250 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: Example Message
From: joy.k@abccompany.com
To: my.friend@parentcompany.com

Yo,

Sending a test message.

  Later,
Joy
.
250 Ok: queued as 45334
QUIT
221 Bye

The lines that begin with numbers are server responses. The other lines are what you're typing.

You should get either something like the above session, or you might receive an error.

In both of these situations, the best way to resolve this is to configure your server to route e-mail through your local MTA and let it deliver e-mail. You'll have to check your e-mail server's configuration to see what the options are to make this setting.

Carl
 

10 More Discussions You Might Find Interesting

1. IP Networking

unix and websites

Does Anyone know how to create domains ahead of another domain? example http://domain.example.com Any Information would be of great help. Thank you. (2 Replies)
Discussion started by: bhjunx
2 Replies

2. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

3. Shell Programming and Scripting

How can i send mail to multiple addresses in same domain in bash?

Suppose i have a txt file that is the list of the addresses,something like: lala0045 john james lala0234 george james and i want to send an email to lala0045@blabla.com and lala0234@blabla.com,the same domain...what is the exact syntax i should use in my script? there is a command... (10 Replies)
Discussion started by: bashuser2
10 Replies

4. Shell Programming and Scripting

Echo - Sending mail to multiple addresses

Hi, If I want my script to send a mail to multiple recipients I can do the following: if then echo $err_string1 | mailx -s "UAT CPU ALERT" 1@email.com echo $err_string1 | mailx -s "UAT CPU ALERT" 2@email.com fi Can this also be done something like: ... (1 Reply)
Discussion started by: runnerpaul
1 Replies

5. UNIX for Dummies Questions & Answers

Teaching myself Unix - Need websites and other pointers

Hi, I am new to Unix. I've started with a book "Unix for Dummies". Please help, any websites with extensive amount of practice exercises are needed. I need to practice! Also I would appreciate any books that are good for beginners. Thanks to all! (1 Reply)
Discussion started by: zamcruiser
1 Replies

6. Shell Programming and Scripting

Perl - match e-mail addresses in multiple files

Hi, I'm trying to write a script that will check multiple files in a directory (all the relevant filenames begin "TT04.NOTES") for e-mail addresses, and then print these addresses to screen with a count at the bottom. I'm a bit of a novice with Perl but thought it would be the best tool for the... (2 Replies)
Discussion started by: wf1974
2 Replies

7. UNIX for Dummies Questions & Answers

Sending through an external e-mail account

Hi guys. After several Google hours, i've failed to find a solution to my problem, maybe my google skills arent that good - but i hope someone could help me figure this out. I'm running a ubuntu server 11.04 with postfix installed. I have installed Request tracker 4 and configured it to read... (2 Replies)
Discussion started by: spirm8
2 Replies

8. UNIX for Advanced & Expert Users

Mutt to use external mail server

Hi, Using mutt im triggering a mail with attachment to 2 different recipient. How can i use gmail/official mail server to send mails using mutt service only. kindly shed some idea Script which i use now SUBJECT="Mail from myserver" EMAIL="user1@mail.com,other@mail.com"... (0 Replies)
Discussion started by: Paulwintech
0 Replies

9. Shell Programming and Scripting

Extract e-mail addresses on a page

Hi I normally ask questions on coding but I think there is a code that can do this. I have regular text throughout my file and I want to extract all e-mail addresses from it (rather than going and searching each one). E-mails all have @ so I assume there is a way. Thanks Phil (6 Replies)
Discussion started by: phil_heath
6 Replies

10. UNIX for Beginners Questions & Answers

Sifting out mail addresses with grep and regex

Hi there from a newbie. So, I have this huuuge portion of mail addresses with names interlaced.. looks like: "name1" <mail1@domain1.com>, "name2" <mail2@domain2.com> ... Sometimes there are no names, just mailaddress. My thought was to use regex with grep. I saved the list in file ma and... (2 Replies)
Discussion started by: dr_xemacs
2 Replies
MAKESMTPACCESS, MAKE(8) 				      Double Precision, Inc.					   MAKESMTPACCESS, MAKE(8)

NAME
makesmtpaccess - Build ESMTP server access file SYNOPSIS
makesmtpaccess makesmtpaccess-msa DESCRIPTION
makesmtpaccess rebuilds the contents of the /etc/courier/smtpaccess.dat database from the contents of the files in the /etc/courier/smtpaccess directory. When the esmtpd script starts couriertcpd, the script specifies /etc/courier/smtpaccess.dat file to control access to the Courier mail server's ESMTP daemon. The makesmtpaccess script must be run before any changes in the /etc/courier/smtpaccess directory take effect. The couriertcpd(8)[1] manual page describes the general format of the access file. The default Courier mail server configuration uses the same access file, /etc/courier/smtpaccess.dat for both the regular ESMTP server, and the message submission server on port 587 (RFC 2476[2]). It is possible to use different access files. To do so, create a different access file, edit /etc/courier/esmtpd-msa, and set ACCESSFILE to the filename of the access file directory (the directory containing the plain text files, not the .dat file). Then, use makesmtpaccess-msa instead of makesmtpaccess to build the .dat file. The smtpaccess configuration file The couriertcpd(8)[1] manual page describes the generic format of the access file. The access file specifies what should be done with connections from defined IP address ranges. The basic choices are to accept or reject the connection. Also, the generic format of the access file allows arbitrary environment variables to be set based on the connection's remote IP address. The Courier mail server's ESMTPD server understands the following environment variables, which may be set in the access file: BLOCK If this variable is set to a non-empty value, all mail will be rejected for this connection. The contents of the environment variable will be used as the error message. This is not the same as the couriertcpd access file setting that immediately drops the connection. The incoming connection is accepted, but every message will be rejected. FAXRELAYCLIENT Allow the client to send faxes via the courierfax(8)[3] module. Note When ESMTP authentication is enabled, a successful authentication automatically sets FAXRELAYCLIENT. RELAYCLIENT Allow the client to relay mail. Note When ESMTP authentication is enabled, a successful authentication automatically sets RELAYCLIENT. The following options are typically set globally in the esmtpd configuration file, but may be overriden in the smtpaccess configuration file: BOFHCHECKDNS Do not check the return address's domain in DNS if this environment variable is set to 0. The default value of BOFHCHECKDNS is 1. Note Turning off the DNS check disables a number of options in the bofh configuration file. See courier(8)[4] for more information. BOFHCHECKHELO Set this variable to 1 to check the hostname argument to the ESMTP HELO/EHLO command, as follows: o A hostname that's actually an IP address, and is the same as the connecting ESMTP client's IP address, is valid. o Otherwise hostname should be a valid DNS name with MX and/or A records, with at least one record matching the connecting ESMTP client's IP address. o An ESMTP client with relaying privileges (either due to RELAYCLIENT explicitly set, or if it succesfully authenticates) may use anything for an EHLO/HELO. The EHLO/HELO argument coming from an authenticated/relaying client is not checked. BOFHNOEXPN Disable the EXPN command if this environment variable is set to 1. BOFHNOVRFY Disable the VRFY command if this environment variable is set to 1. Other useful environment variables are listed in the submit(8)[5] manual page. SEE ALSO
esmtpd(8)[6], couriertcpd(8)[1], submit(8)[5]. AUTHOR
Sam Varshavchik Author NOTES
1. couriertcpd(8) [set $man.base.url.for.relative.links]/couriertcpd.html 2. RFC 2476 http://www.rfc-editor.org/rfc/rfc2476.txt 3. courierfax(8) [set $man.base.url.for.relative.links]/courierfax.html 4. courier(8) [set $man.base.url.for.relative.links]/courier.html 5. submit(8) [set $man.base.url.for.relative.links]/submit.html 6. esmtpd(8) [set $man.base.url.for.relative.links]/esmtpd.html Courier Mail Server 08/30/2011 MAKESMTPACCESS, MAKE(8)
All times are GMT -4. The time now is 07:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy