LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-16-2009, 02:44 AM   #1
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Rep: Reputation: 15
Unhappy Mail is not going retry timeout exceed error


Hi to all,
Hope everyone will be fine.I am new to Linux and i want to send mail from one server to another means mail is going from server1 xxx.x.xxx.xx IP address to server2 yyy.y.yyy.yyy IP address. I have a main domain named say domain.com(On server1) and i want that mail is go to subdomain.domain.com(On server2).
For this first i changed the server2 name to subdomain.domain.com by editing the /etc/sysconfig/network and change the HOSTNAME to subdomain.domain.com. On server 2 i have sendmail.Then i created the user by useradd harry and using mutt when i log in tu user basit it shows a message that
/var/spool/mail/root: Permission denied (errno = 13)

i don't no why this message come but when i send mail to harry using mutt its work fine.
Now on my server1 i created the MX record like this

$ORIGIN .
$TTL 86400 ; 1 day
domain.com IN SOA ns1.domain.com. admin.domain.com. (
904233139
10800
3600
604800
86400 )
domain.com. IN NS ns1.domain.com.
domain.com. IN NS ns2.domain.com.
domain.com. IN MX 10 mail.domain.com.
ns1.domain.com. IN A xx.xxx.xx.xx
ns2.domain.com. IN A xx.xxx.xx.xx
domain.com. IN NS subdomain.domain.com.
subdomain.domain.com. IN MX 10 subdomain.domain.com.
subdomain.domain.com. IN A yyy.y.yyy.yyy

$ORIGIN domain.com.

hrm A yyy.y.yyy.yyy
netlah A xx.xxx.xx.xx
sahil A xx.xxx.xx.xx
bbc A yyy.y.yyy.yyy
subdomain A yyy.y.yyy.yyy

On server1 i have an atmail installed so when i try to send email to harry@subdomain.domain.com the mail return and the error is retry timeout exceed.
When i use the command on server1 that telnet subdomain.domain.com 25

Trying xx.xxx.xx.xx...
Connected to subdomain.domain.com (xx.xxx.xx.xx).
Escape character is '^]'.
220 ns1.domain.com Welcome to the @Mail SMTP Server ( Exim )
ehlo yyy.y.yyy.yyy
250-ns1.domain.com Hello www.domain.com [xx.xxx.xx.xx]
250-SIZE 52428800
250-PIPELINING
250-AUTH LOGIN
250 HELP
ehlo localhost
250-ns1.domain.com Hello www.domain.com [xx.xxx.xx.xx]
250-SIZE 52428800
250-PIPELINING
250-AUTH LOGIN
250 HELP
quit
221 ns1.domain.com closing connection
Connection closed by foreign host.
[root@ns1 ~]#

So my question is where i am doing wrong that when i use telnet subdomain.domain.com 25 it starts try to connect xx.xxx.xx.xx rather than yyy.y.yyy.yyy and why it shows retry timeout exceed. Please guide me and help me
I searched this error that it is because your mailbix is full or some space issue but i created a new user how it's mail box can be full. So please help me

Thanks in advance.
 
Old 10-16-2009, 04:59 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Welcome to LQ

Quote:
So my question is where i am doing wrong that when i use telnet subdomain.domain.com 25 it starts try to connect xx.xxx.xx.xx rather than yyy.y.yyy.yyy and why it shows retry timeout exceed.
You must first solve your dns problem.
The timeout error could be due to various reasons besides a full mailbox (could be a firewall)
To check you dns, run from server1
Code:
dig subdomain.domain.com
 
Old 10-16-2009, 05:49 AM   #3
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Hi,
Thanks for the reply. I did and the output is

[root@ns1 ~]# dig subdomain.domain.com


; <<>> DiG 9.2.4 <<>> subdomain.domain.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26040
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 2

;; QUESTION SECTION:
;subdomain.domain.com. IN A

;; ANSWER SECTION:
subdomain.domain.com. 86400 IN A yyy.y.yyy.yyy
subdomain.domain.com. 86400 IN A xx.xxx.xx.xx

;; AUTHORITY SECTION:
domain.com. 86400 IN NS subdomain.domain.com.
domain.com. 86400 IN NS ns1.domain.com.
domain.com. 86400 IN NS ns2.domain.com.

;; ADDITIONAL SECTION:
ns1.domain.com. 86400 IN A xx.xxx.xx.xx
ns2.domain.com. 86400 IN A xx.xxx.xx.xx

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Oct 16 16:39:37 2009
;; MSG SIZE rcvd: 156

[root@ns1 ~]#

One thing that i don't understand that when i define subdomain.domain.com points to IP address yyy.y.yyy.yyy then why it is show this line
subdomain.domain.com. 86400 IN A xx.xxx.xx.xx

i didn't point my subdomain.domain.com to this IP in my MX record file, it should only point to my server2 IP i.e., yyy.y.yyy.yyy

Thank you.
 
Old 10-16-2009, 06:08 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
You should remove the 2 $ORIGIN records (specially the 2nd one makes subdomain.domain.com authoritative for the domain). Increase serial, restart bind and see if dig gives the correct results.

Btw, you don't have an A record for your domain's MX server (mail.domain.com)
 
Old 10-16-2009, 06:30 AM   #5
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Hi,
Thank you.You mean remove these two lines only
$ORIGIN .
$ORIGIN domain.com.

Increase serial but how much.

No I have under the $ORIGIN . directive like this
$ORIGIN .
domain.com. IN MX 10 mail.domain.com.

and also under the $ORIGIN domain.com. like this

$ORIGIN domain.com.
A xx.xxx.xx.xx
www A xx.xxx.xx.xx
mail A xx.xxx.xx.xx
circle A xx.xxx.xx.xx
entertainment A xx.xxx.xx.xx
subdomain.domain.com A yyy.y.yyy.yyy

Thank you.
 
Old 10-16-2009, 06:48 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Yes I mean those 2 lines. $ORIGIN is taken from named.conf, so unless you need to do something unusual, you can safely omit it.

Serial in you case is the number 904233139 and every time you make a change in the zone file, you have to increase it, so when you reload bind it will read the changes. If the serial remains the same, bind does not bother to read the rest of the zone file

You don't have:
mail A xx.xxx.xx.xx
 
Old 10-16-2009, 07:18 AM   #7
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Hi,
Thank you .

I have removed the lines and now my MX record file is look like this

$TTL 86400 ; 1 day
domain.com IN SOA ns1.domain.com. admin.domain.com. (
905344249
10800
3600
604800
86400 )
domain.com. IN NS ns1.domain.com.
domain.com. IN NS ns2.domain.com.
domain.com. IN MX 10 mail.domain.com.
ns1.domain.com. IN A 38.105.84.66
ns2.domain.com. IN A 38.105.84.66
domain.com. IN NS subdomain.domain.com.
subdomain.domain.com. IN MX 10 subdomain.domain.com.
subdomain.domain.com. IN A 202.5.145.100



A xx.xxx.xx.xx
www A xx.xxx.xx.xx
mail A xx.xxx.xx.xx
circle A xx.xxx.xx.xx
entertainment A xx.xxx.xx.xx
bbc A yyy.y.yyy.yyy
subdomain A yyy.y.yyy.yyy

And after restarting named(/etc/init.d/named restart) and running dig i got the output


[root@ns1 ~]# dig subdomain.domain.com

; <<>> DiG 9.2.4 <<>> subdomain.domain.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 53814
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;subdomain.domain.com IN A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Oct 16 18:11:27 2009
;; MSG SIZE rcvd: 42

[root@ns1 ~]#

Oh everything has gone

What happened is this.

If i don't have

mail A xx.xxx.xx.xx

then how can i define it and what is this that had defined under @ORIGIN directive previously

mail A xx.xxx.xx.xx

if it didn't that you are asking then please tell me what you are talking about(mail A xxx.xx.xx.xx)

Thank you.
 
Old 10-16-2009, 07:47 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Use this zone file and see if it works.
Code:
$TTL 86400 ; 1 day
@ IN SOA ns1.domain.com. admin.domain.com. (
905344250
10800
3600
604800
86400 )

                    NS ns1.domain.com.
                    NS ns2.domain.com.
                    MX 10 mail.domain.com.

ns1.domain.com. IN A 38.105.84.66
ns2.domain.com. IN A 38.105.84.66
domain.com. IN NS subdomain.domain.com.
A xx.xxx.xx.xx
www A xx.xxx.xx.xx
mail A xx.xxx.xx.xx
circle A xx.xxx.xx.xx
entertainment A xx.xxx.xx.xx
bbc A yyy.y.yyy.yyy
subdomain A yyy.y.yyy.yyy 

$ORIGIN subdomain.domain.com.
subdomain.domain.com. IN MX 10 subdomain.domain.com.
subdomain.domain.com. IN A 202.5.145.100
Take a look at the log files to see why you get the SERVFAIL error
 
Old 10-20-2009, 12:06 AM   #9
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Hi,
Hope you will be fine.Sorry for late reply actually i came down to illness since Friday. Anyways i did what u told me and then i get following messages in my var/log/messages

Oct 20 10:48:48 ns1 named[2803]: shutting down: flushing changes
Oct 20 10:48:48 ns1 named[2803]: stopping command channel on 127.0.0.1#953
Oct 20 10:48:48 ns1 named[2803]: no longer listening on 127.0.0.1#53
Oct 20 10:48:48 ns1 named[2803]: no longer listening on 38.105.84.66#53
Oct 20 10:48:48 ns1 named[2803]: exiting
Oct 20 10:48:48 ns1 named: succeeded
Oct 20 10:48:50 ns1 named[18700]: starting BIND -u named -t /var/named/chroot
Oct 20 10:48:50 ns1 named[18700]: using 4 CPUs
Oct 20 10:48:50 ns1 named[18700]: loading configuration from '/etc/named.conf'
Oct 20 10:48:50 ns1 named[18700]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 20 10:48:50 ns1 named[18700]: listening on IPv4 interface eth0, 38.105.84.66#53
Oct 20 10:48:50 ns1 named[18700]: command channel listening on 127.0.0.1#953
Oct 20 10:48:50 ns1 named[18700]: zone 0.in-addr.arpa/IN: loaded serial 42
Oct 20 10:48:50 ns1 named[18700]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Oct 20 10:48:50 ns1 named[18700]: zone 255.in-addr.arpa/IN: loaded serial 42
Oct 20 10:48:50 ns1 named[18700]: zone 84.105.38.in-addr.arpa/IN: loaded serial 904233132
Oct 20 10:48:50 ns1 named[18700]: zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 1997022700
Oct 20 10:48:50 ns1 named[18700]: zone brightees.com/IN: loaded serial 904233131
Oct 20 10:48:50 ns1 named[18700]: zone friendlygrip.com/IN: loaded serial 904233131
Oct 20 10:48:51 ns1 named[18700]: zone friendlytie.com/IN: loaded serial 904233131
Oct 20 10:48:51 ns1 named[18700]: zone friendlyties.com/IN: loaded serial 904233131
Oct 20 10:48:51 ns1 named[18700]: db.harvardgreens.com:27: file does not end with newline
Oct 20 10:48:51 ns1 named[18700]: zone harvardgreens.com/IN: loaded serial 904233139
Oct 20 10:48:51 ns1 named[18700]: zone netfaisalabad.com/IN: loaded serial 904233131
Oct 20 10:48:51 ns1 named[18700]: zone nethyderabad.com/IN: loaded serial 904233131
Oct 20 10:48:51 ns1 named[18700]: zone netislamabad.com/IN: loaded serial 904233131
Oct 20 10:48:51 ns1 named[18700]: dns_master_load: db.netkarachi.com:46: unexpected end of line
Oct 20 10:48:51 ns1 named[18700]: dns_master_load: db.netkarachi.com:45: unexpected end of input
Oct 20 10:48:51 ns1 named[18700]: zone netkarachi.com/IN: loading master file db.netkarachi.com: unexpected end of input
Oct 20 10:48:51 ns1 named[18700]: zone netlahore.com/IN: loaded serial 904233133
Oct 20 10:48:51 ns1 named[18700]: zone yaarline.com/IN: loaded serial 904233131
Oct 20 10:48:51 ns1 named[18700]: zone localdomain/IN: loaded serial 42
Oct 20 10:48:51 ns1 named[18700]: zone localhost/IN: loaded serial 42
Oct 20 10:48:51 ns1 named[18700]: running
Oct 20 10:48:51 ns1 named[18700]: zone netlahore.com/IN: sending notifies (serial 904233133)
Oct 20 10:48:51 ns1 named: named startup succeeded


and here is my named.conf file

//
// named.conf for Red Hat caching-nameserver
//

options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
type hint;
file "named.ca";
};

zone "netkarachi.com" {
type master;
file "db.netkarachi.com";
};

zone "harvardgreens.com" {
type master;
file "db.harvardgreens.com";
};

zone "netlahore.com" {
type master;
file "db.netlahore.com";
};

zone "netislamabad.com" {
type master;
file "db.netislamabad.com";
};

zone "nethyderabad.com" {
type master;
file "db.nethyderabad.com";
};

zone "netfaisalabad.com" {
type master;
file "db.netfaisalabad.com";
};

zone "friendlytie.com" {
type master;
file "db.friendlytie.com";
};

zone "friendlyties.com" {
type master;
file "db.friendlyties.com";
};

zone "friendlygrip.com" {
type master;
file "db.friendlygrip.com";
};

zone "yaarline.com" {
type master;
file "db.yaarline.com";
};


zone "brightees.com" {
type master;
file "db.brightees.com";
};

zone "84.105.38.in-addr.arpa" IN {
type master;
file "db.84.105.38.in-addr.arpa";
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};

logging {
category lame-servers { null; };

};

include "/etc/rndc.key";

Please tell me is it a issue to named.conf file.Thank you for your replies
Thanks in advance
 
Old 10-20-2009, 01:59 AM   #10
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
According to startup logs you must correct the following zone files: db.harvardgreens.com, db.netkarachi.com. Go to the lines indicated in the log and see what's wrong. Don't forget to incease the serial (by 1) and reload bind.
Are any of these the zone that gives the SERVFAIL?
 
Old 10-27-2009, 02:01 AM   #11
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Unhappy

Hi,
Hope you will be fine. I m tired with trying send mail using subdomain.So now i am using another domain name nethyderabad because i have so many domain names that i can use. The setting for my nethyderabad zone file is

$ORIGIN .
$TTL 86400 ; 1 day
nethyderabad.com IN SOA voicemail.netkarachi.com. admin.netkarachi.com. (
904233134 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
nethyderabad.com. NS voicemail.netkarachi.com.

; A Record
nethyderabad.com. IN A 202.5.145.100

; MX record
nethyderabad.com. MX 0 mail.nethyderabad.com.

$ORIGIN nethyderabad.com.

www A 202.5.145.100

and the output of dig nethyderabad.com is

[root@ns1 atmail]# dig nethyderabad.com

; <<>> DiG 9.2.4 <<>> nethyderabad.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20171
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;nethyderabad.com. IN A

;; ANSWER SECTION:
nethyderabad.com. 86400 IN A 202.5.145.100

;; AUTHORITY SECTION:
nethyderabad.com. 86400 IN NS voicemail.netkarachi.com.

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Oct 27 12:22:56 2009
;; MSG SIZE rcvd: 85

First of all i want to ask some questions for my understanding.
The name of your server is the one that you set in your /etc/sysconfig/network file is it?

Second if after changing my hostname when i create new user in linux then what mail address it is holding. Means if i change my hostname to voicemail.netkarachi.com and then create user basit then basit address is basit@voicemail.netkarachi.com is it?

Third if i want to send mail to basit then i send it to basit@voicemail.netkarachi.com or at what address?

Fourth if i want to know what mail server i am using how can i find it means sendmail or my atmail own mail server or whatever?

Now i want to tell you that what i want to do please give me hint that how can i do it using this domain name ,ok, please, i am so frustrate because i am not able to send email to another server.

I have an atmail(Client + Server) installed on my server whose Ip is 38.105.84.66 and i want to send mail to basit that i defined on voicemail.netkarachi.com server whose Ip is 202.5.145.100.

Now using above settings when i send mail to basit@nethyderabad.com i encounter an error
all relevant MX records point to non-existent hosts

but i want to send mail to basit@voicemail.netkaarchi.com (i think)

oh my God what i do, please tell me because i know its so simple, it's just a matter of configure some files only please help me please

Thanks in advance
 
Old 10-27-2009, 03:41 AM   #12
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Let's try to answer your questions
1. Yes, but that name is known locally to the machine. If you use a dns server to access your box, then the hostname is the one provided by dns
2. Unless you are using masquerading, yes the from: address will be the one you mentioned.
3. Depends on the configuration. Locally you can use just the username. Remotely you're using the mx record of the user's domain.
4. Usually you can telnet on port 25 and look at the response. Many mail servers give their name and maybe the version.

I don't know how atmail works, so I cannot help you on this. But for sendmail that I assume runs on voicemail.netkarachi.com (202.5.145.100), you must define the domains it can accept mail (it's done in (/etc/mail/local-host-names). For your domain, it looks like the MX server is mail.nethyderabad.com, which cannot be resolved:
Code:
dig mx nethyderabad.com

; <<>> DiG 9.6.1 <<>> mx nethyderabad.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48754
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;nethyderabad.com.              IN      MX

;; ANSWER SECTION:
nethyderabad.com.       84362   IN      MX      0 mail.nethyderabad.com.

;; AUTHORITY SECTION:
nethyderabad.com.       84362   IN      NS      voicemail.netkarachi.com.

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Oct 27 10:30:00 2009
;; MSG SIZE  rcvd: 90
You need to add an A record for mail.nethyderabad.com. in the zone file you've posted, so your MX can be resolved.
But first of all you must resolve the problem with the zone netkarachi.com, as the authoritative dns for nethyderabad.com is voicemail.netkarachi.com, that cannot be resolved also!!!!

Regards
 
Old 10-30-2009, 02:57 AM   #13
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Question

Hi
Thanks for your help.I did it now when i send mail to nethyderabad.com it is going to my second server and also in a user mail box . I changed my file in this manner

$ORIGIN .
$TTL 86400 ; 1 day
nethyderabad.com IN SOA ns1.netkarachi.com. admin.netkarachi.com. (
904233134 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
nethyderabad.com. IN NS ns1.netkarachi.com.
nethyderabad.com. IN MX 10 mail.nethyderabad.com.


$ORIGIN nethyderabad.com.

A 202.5.145.100
www A 202.5.145.100
mail A 202.5.145.100

Thank God now i have relief little bit.Thanks for your help

Now i want to ask another thing i don't no you help me on this matter or not but i am sure you certainly give me some hint that how can i achieve this.

when i send email to kashif(the user that i created on my 202.5.xx.xx server)It goes to kashif mail box thats fine remember text mail. Now when i send voicemail to kashif it store in this manner

From basit_mahmood@netkarachi.com Fri Oct 30 19:04:59 2009
Return-Path: <basit_mahmood@netkarachi.com>
Received: from ns1.netkarachi.com (mail.netkarachi.com [38.105.84.66])
by ns9.nethyderabad.com (8.13.1/8.13.1) with ESMTP id n9UD4aB3014819
for <kashif@nethyderabad.com>; Fri, 30 Oct 2009 19:04:37 +0600
Received: from localhost ([127.0.0.1])
by ns1.netkarachi.com with esmtp (Exim 4.63)
(envelope-from <basit_mahmood@netkarachi.com>)
id 1N3xqv-00014T-5E
for kashif@nethyderabad.com; Fri, 30 Oct 2009 13:13:41 -0700
MIME-Version: 1.0
X-Mailer: AtMail PHP 5.06
Message-ID: <55239.1256933621@netkarachi.com>
To: <kashif@nethyderabad.com>
Reply-To: basit_mahmood@netkarachi.com
Content-Type: multipart/mixed;
boundary="=_47d56ec44236456d122f47a05e3fa752"
X-Origin: 119.155.5.32
Date: Fri, 30 Oct 2009 13:13:41 -0700
Subject: VoiceMail: voice mail check
From: <basit_mahmood@netkarachi.com>

--=_47d56ec44236456d122f47a05e3fa752
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<HTML><table width=3D"100%" style=3D"border: 1px solid #215576;">
<tr>
<td style=3D"padding: 3px;" nowrap>
This Email has Voice maill attached : <br>
</td>
</tr>
</table>
<br>
<HTML>
This is an email containing voice mail<br>
<BR><hr>Msg sent via NetKarachi - http://www.netkarachi.com/</HTML>

</HTML>
--=_47d56ec44236456d122f47a05e3fa752
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream;
name="Voicemail32955.wav";
Content-Disposition: attachment;
filename="Voicemail32955.wav";

UklGRpzgAQBXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YXjgAQCAgH+AgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgIGAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgYCAgYCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgIGBgYCAgYGBgYCAgIGBgICAgYGBgICAgYGBgICBgYGBgIGBgYGAgIGBgYGAgICBgYCAgIGB
gYCBgIGBgYCAgICBgICAgICAgYCAgICBgICAgIGAgIGAgICAgICAgYCAgIGBgIGAgICBgICAgYGA
gICAgYGAgIGAgICBgIGAgICBgYCAgICBgYCAgIGAgICAgIGAgIGAgYGAgYCBgYCAgICAgICAgYCA
gICAgICBgIGAgICBgYCAgICBgICBgYGBgICAgYGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGB
gYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgIGBgYGBgIGBgICBgYGBgIGBgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBgYCBgIGAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA........................ ...............................................................gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA=
--=_47d56ec44236456d122f47a05e3fa752--

means voicemail start from some garbage when it comes to kashif mail box.

Now i want that when kashif receive mail(text + voice) this mail is not going to kashif mail box but in a particular folder for this i try this. I changed the kashif alises like this

# Person who should get root's mail
#root: marc
basit: root
saadiq: root
kashif: /var/spool/asterisk/voicemail/brights/220/INBOX

but it was not working.

Second can you please tell me if i want that when kashif receive email the sendmail extract the voicemail part from it and send this voicemail part to in a particular folder.

Thanks in advance i know it's a complex question but any hint any help please tell me or guide me that how can i do this please.
Thank you very much
 
Old 10-30-2009, 04:44 AM   #14
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Glad to see you've sorted out the dns errors

Now regarding your new question, you can use procmail (create a file .procmailrc in the user's homedir), to save the mails where you want, dependig on the attachment type.
Use this perl script that can save the attachment where you want (e.g. change TEMPDIR to /var/spool/asterisk/voicemail/brights/220/INBOX) and this .procmailrc to filter only the wav files:
Code:
:0 B:
* ^Content-Type: .*;$[ ]*(file)?name=\"?.*\.(wav)\"?$
|/path/to/script.pl
 
Old 10-30-2009, 05:29 AM   #15
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Hi ,
Thank you very much.Just confirm me i m doing right or not. You say create .procmailrc fille in user's home dorectory. Means in the /home/kashif/mail/ or just /home/kashif folder which also contain some files like .bash_history, .bash_logout, .bash_profile and other files also. The /home/kashif/mail/ is empty.

Second after creating the file in the targeted folder that is i think is one of the above mentioned path, copy the script in the file and changes the $TMPDIR which is in the original script is pointing to "/var/spool/mail/MIME" changes to "/var/spool/asterisk/voicemail/220/INBOX", then in the /etc/aliases file define detach: |"/your/path/to/script/unmime", means if i create my file in the /home/kashif/mail/ directory then it should be like detach: |"/home/kashif/mail/file.procmailrc" in the /etc/aliases. Can you please tell me that where i define this line means anywhere in the aliases file or in a particular place in the file.

Third can you please tell me what is this code means where i put this code that you have posted i mean this
Code:
:0 B:
* ^Content-Type: .*;$[ ]*(file)?name=\"?.*\.(wav)\"?$
|/path/to/script.pl
Thank you. Sorry for asking so much questions
Thanks in advance
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
stop incoming mail while quota exceed in openwebmail shan_nathan Linux - Server 1 10-07-2009 08:55 PM
outgoing mail server : timeout error bittus Linux - Newbie 94 11-19-2008 07:16 PM
dd retry on error? SDraconis Linux - General 4 06-12-2005 01:20 AM
increasing retry timeout with mgetty/sendfax? rj1 Linux - General 0 11-09-2004 11:39 PM


All times are GMT -5. The time now is 01:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration