|
[SMS] - Superb Mini Server Project Support Forum |
|
|
|
View previous topic :: View next topic |
Author |
Message |
vivanguarda Member
Joined: 01 May 2009 Posts: 98
|
Posted: Wed Sep 28, 2011 11:38 pm Post subject: Send Mail and Command Line |
|
|
Good Evening!!!
I 'd like to control when sms server machine is started and stoped. I intend to use konsole to send a mail to a external account and put commands in rc.local and rc.local_shutdown. Then how can I edit MTA or Sendmail to function in a simple mail -s or mutt command operation?
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Thu Sep 29, 2011 9:21 am Post subject: |
|
|
That should be enough
You can acces email from terminal as well..
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
vivanguarda Member
Joined: 01 May 2009 Posts: 98
|
Posted: Thu Mar 14, 2013 6:54 pm Post subject: |
|
|
I am digging up this topic because today it is important again. I intend to send message´s server using command line, in a way to know when this server is turn up and turn off. Unfortunatelly, I didn´t get it´s working yet but do you think is it important a Sendmail running only for it? In case of doing, Sendmail in SMS is already enable and is it setting up a sendmail.cf ?
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Thu Mar 14, 2013 7:41 pm Post subject: |
|
|
What version of SMS you using now...
SMS now has postfix as default MTA so sendmail is disabled (don't confuse sendmail binary).
If you have both MTAs enabled you will have problems most likely, although Sendmail will fail to start.
Do you get an error when running the above command?
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
vivanguarda Member
Joined: 01 May 2009 Posts: 98
|
Posted: Tue Mar 26, 2013 12:25 am Post subject: |
|
|
Gerasimos, can you help me in a sendmail operation out of sms system?
So, I intend to receive messages when my SMs server start up, but this function I hope occurs in another machine running default freshed install slackare 14.
Then, I have this sendmail.mc and run m4 to proceed sendmail.cf. I used
http://www.linuxquestions.org/questions/slackware-14/sendmail-smtp-auth-howto-224543/
howto to configure it. I am using ig.com.br ISP in a smat_host. What else I need to configure to run corretcly sendmail? If I need change sendmail.cf is important another m4 figure out or a direct file editing?
Code: | dnl# This is the default sendmail .mc file for Slackware. To generate
dnl# the sendmail.cf file from this (perhaps after making some changes),
dnl# use the m4 files in /usr/share/sendmail/cf like this:
dnl#
dnl# cp sendmail-slackware.mc /usr/share/sendmail/cf/config.mc
dnl# cd /usr/share/sendmail/cf
dnl# sh Build config.cf
dnl#
dnl# You may then install the resulting .cf file:
dnl# cp config.cf /etc/mail/sendmail.cf
dnl#
include(`../m4/cf.m4')
VERSIONID(`default setup for Slackware Linux')dnl
OSTYPE(`linux')dnl
dnl# These settings help protect against people verifying email addresses
dnl# at your site in order to send you email that you probably don't want:
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
dnl# Uncomment the line below to send outgoing mail through an external server:
define(`SMART_HOST',`smtp.ig.com.br')
dnl# No timeout for ident:
define(`confTO_IDENT', `0')dnl
dnl# Enable the line below to use smrsh to restrict what sendmail can run:
dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
dnl# See the README in /usr/share/sendmail/cf for a ton of information on
dnl# how these options work:
FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
dnl FEATURE(`accept_unresolvable_domains')dnl
EXPOSED_USER(`root')dnl
dnl# Also accept mail for localhost.localdomain:
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl | [/list]
Sorry, if it's out of scope!
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Mar 26, 2013 10:34 pm Post subject: |
|
|
If you follow the guide it's working alright...
no need for certs or anything else, just add in your config
Code: | define(`SMART_HOST',`[YOUR RELAY SERVER]')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl
define(`confAUTH_OPTIONS', `A p y')dnl
|
Copy your config in /usr/share/sendmail/cf/cf as sendmail.mc and do
Code: | cd /usr/share/sendmail/cf/cf/
m4 sendmail.mc >/etc/mail/sendmail.cf
/etc/rc.d/rc.sendmail restart |
Assuming you already add the auth info in /etc/mail/authinfo, mail should be relayed through your smart host...
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
vivanguarda Member
Joined: 01 May 2009 Posts: 98
|
Posted: Wed Mar 27, 2013 4:21 am Post subject: |
|
|
I had this output after last editing in /sendmail.cf.
Are there another ways of pinpoint the problem?
Code: | m4 /usr/share/sendmail/cf/cf/sendmail-slackware.mc > /etc/mail/sendmail.cf
bash-4.2# /etc/rc.d/rc.sendmail restart
Starting sendmail MTA daemon: /usr/sbin/sendmail -L sm-mta -bd -q5m
Starting sendmail MSP queue runner: /usr/sbin/sendmail -L sm-msp-queue -Ac -q5m |
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed Mar 27, 2013 8:10 am Post subject: |
|
|
Your output has no errors.
Send an email and look at /var/log/maillog
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
vivanguarda Member
Joined: 01 May 2009 Posts: 98
|
Posted: Thu Mar 28, 2013 4:59 am Post subject: |
|
|
The output is large. It 's only final part, but arquive var_log_maillog.txt is complete output
Code: | Mar 17 11:21:34 maq1 sm-mta[3842]: r2HCGVUA003182: to=<vivanguarda2@ig.com.br>, ctladdr=<root@maq1> (0/0), delay=02:05:03, xdelay=00:02:07, mai
ler=relay, pri=2370433, relay=ig.com.br. [187.31.64.25], dsn=4.0.0, stat=Deferred: Connection timed out with ig.com.br.
Mar 17 11:23:52 maq1 sm-mta[3164]: rejecting connections on daemon MTA: load average: 12
Mar 17 11:23:52 maq1 sm-mta[3164]: rejecting connections on daemon MSA: load average: 13
Mar 17 11:24:06 maq1 sm-mta[3164]: rejecting connections on daemon MTA: load average: 16
Mar 17 11:24:06 maq1 sm-mta[3164]: rejecting connections on daemon MSA: load average: 16
Mar 17 11:24:21 maq1 sm-mta[3164]: rejecting connections on daemon MTA: load average: 16
Mar 17 11:24:21 maq1 sm-mta[3164]: rejecting connections on daemon MSA: load average: 16
Mar 17 11:24:36 maq1 sm-mta[3164]: rejecting connections on daemon MTA: load average: 15
Mar 17 11:24:36 maq1 sm-mta[3164]: rejecting connections on daemon MSA: load average: 15
Mar 17 11:24:51 maq1 sm-mta[3164]: rejecting connections on daemon MTA: load average: 13
Mar 17 11:24:51 maq1 sm-mta[3164]: rejecting connections on daemon MSA: load average: 13
Mar 17 11:25:06 maq1 sm-mta[3164]: accepting connections again for daemon MTA
Mar 17 11:25:06 maq1 sm-mta[3164]: accepting connections again for daemon MSA
Mar 17 11:34:12 maq1 sm-mta[1937]: gethostbyaddr(192.168.0.2) failed: 1
Mar 17 11:34:12 maq1 sm-mta[1938]: starting daemon (8.14.5): SMTP+queueing@00:05:00
Mar 17 11:34:13 maq1 sm-msp-queue[1941]: starting daemon (8.14.5): queueing@00:05:00
Mar 17 11:36:19 maq1 sm-mta[1940]: r2HCGVUA003182: to=<vivanguarda2@ig.com.br>, ctladdr=<root@maq1> (0/0), delay=02:19:48, xdelay=00:02:06, mai
ler=relay, pri=2460433, relay=ig.com.br. [187.31.64.25], dsn=4.0.0, stat=Deferred: Connection timed out with ig.com.br.
Mar 17 11:41:20 maq1 sm-mta[2418]: r2HCGVUA003182: to=<vivanguarda2@ig.com.br>, ctladdr=<root@maq1> (0/0), delay=02:24:49, xdelay=00:02:07, mai
ler=relay, pri=2550433, relay=ig.com.br. [187.31.64.25], dsn=4.0.0, stat=Deferred: Connection timed out with ig.com.br.
Mar 17 11:46:20 maq1 sm-mta[2465]: r2HCGVUA003182: to=<vivanguarda2@ig.com.br>, ctladdr=<root@maq1> (0/0), delay=02:29:49, xdelay=00:02:07, mai
ler=relay, pri=2640433, relay=ig.com.br. [187.31.64.25], dsn=4.0.0, stat=Deferred: Connection timed out with ig.com.br. |
Description: |
|
Download |
Filename: |
var_maillog.doc |
Filesize: |
66.5 KB |
Downloaded: |
4900 Time(s) |
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Thu Mar 28, 2013 7:24 am Post subject: |
|
|
Try to use smtp.ig.com.br instead of ig.com.br
Code: | define(`SMART_HOST',`[smtp.ig.com.br]')dnl |
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
vivanguarda Member
Joined: 01 May 2009 Posts: 98
|
Posted: Thu Mar 28, 2013 10:32 pm Post subject: |
|
|
I edited sendmail.cf and ran m4, but nothing yet!
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Fri Mar 29, 2013 12:10 am Post subject: |
|
|
Did you restart sendmail?
Also what log says now when you send email..?
Did you have auth data correct in /etc/mail/authinfo?
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
vivanguarda Member
Joined: 01 May 2009 Posts: 98
|
Posted: Fri Mar 29, 2013 4:12 am Post subject: |
|
|
It's my /etc/mail/authinfo?
Quote: | AuthInfo:ig.com.br "U:vivanguarda2@ig.com.br" "P:xxxxxxxx" "M:PLAIN"
AuthInfo: "U:vivanguarda2@ig.com.br" "P:xxxxxxxx" "M:PLAIN |
I restarted sendmail after last reboot . This is my last part of /var/maillog and there is an error data in my system , ok? ( today 03-17-2013 )
what's the importance of gethostbyaddr(192.168.0.2) failed: 1 and DSN: Service unavailable?
Quote: | Mar 17 21:15:35 maq1 sm-mta[3604]: gethostbyaddr(192.168.0.2) failed: 1
Mar 17 21:15:35 maq1 sm-mta[3605]: starting daemon (8.14.5): SMTP+queueing@00:05:00
Mar 17 21:15:36 maq1 sm-msp-queue[3608]: starting daemon (8.14.5): queueing@00:05:00
Mar 17 21:18:54 maq1 sendmail[3628]: r2I0IrDb003628: from=root, size=227, class=0, nrcpts=1,
msgid=<201303180018.r2I0IrDb003628@maq1>, relay=root@localhost
Mar 17 21:18:54 maq1 sm-mta[3629]: r2I0IsYZ003629: from=<root@maq1>, size=433, class=0, nrcpt
s=1, msgid=<201303180018.r2I0IrDb003628@maq1>, proto=ESMTP, daemon=MTA, relay=localhost [127.
0.0.1]
Mar 17 21:18:54 maq1 sendmail[3628]: r2I0IrDb003628: to=vivanguarda2@ig.com.br, ctladdr=root
(0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30227, relay=[127.0.0.1] [127.0.0.1
], dsn=2.0.0, stat=Sent (r2I0IsYZ003629 Message accepted for delivery)
Mar 17 21:18:56 maq1 sm-mta[3631]: STARTTLS=client, relay=brti-ig-smtp.l.google.com., version
=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-RC4-SHA, bits=128/128
Mar 17 21:18:57 maq1 sm-mta[3631]: r2I0IsYZ003629: to=<vivanguarda2@ig.com.br>, ctladdr=<root
@maq1> (0/0), delay=00:00:03, xdelay=00:00:03, mailer=relay, pri=120433, relay=brti-ig-smtp.l
.google.com. [74.125.134.204], dsn=5.0.0, stat=Service unavailable
Mar 17 21:18:57 maq1 sm-mta[3631]: r2I0IsYZ003629: r2I0IvYZ003631: DSN: Service unavailable
Mar 17 21:18:57 maq1 sm-mta[3631]: r2I0IvYZ003631: to=<root@maq1>, delay=00:00:00, xdelay=00:
00:00, mailer=local, pri=31624, dsn=2.0.0, stat=Sent
|
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Fri Mar 29, 2013 7:10 am Post subject: |
|
|
Remove the second line from authinfo and change relay to be the same as sendmail.cf (smtp.ig.com.br)
Code: | AuthInfo:smtp.ig.com.br "U:vivanguarda2@ig.com.br" "P:xxxxxxxx" "M:PLAIN" |
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
vivanguarda Member
Joined: 01 May 2009 Posts: 98
|
Posted: Fri Mar 29, 2013 5:08 pm Post subject: |
|
|
It didn't function. I am looking for a way of doing a simple ISP authentication test using telnet. Furthermore, I am changing this Slack 14 multlib system for another complete CDU SMS configurated. Then, do you have a Sms Postfix HowTo for Smart Host schematical?
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional
|
|
|
|