|
|
SMS Server Tools 3 Community |
Welcome, Guest. The forum is currently read-only, but will open soon. |
Thu Apr 24, 2025 19:41 |
This topic is locked
Page: 1
Author |
Post |
|
#1 Thu Jul 22, 2010 12:10, 179 months ago.
|
Member
Registered: Jul 2010
Location: Moscow, Russian Federation
|
Operating system name and version: Linux kello.ru 2.6.32.16-141.fc12.i686 #1 SMP Wed Jul 7 04:47:25 UTC 2010 i686 i686 i386 GNU/Linux Version of smsd: smstools-3.1.3-7.fc12.i686 Smsd installed from: package repository Name and model of a modem: Huawei Technologies Co., Ltd. E620 USB Modem Interface: USB Dear all! I'm trying to build email2sms gateway using fedora linux and Huawei USB-modem. The system runs sendmail with procmail to sort mail. I'm trying to use email2sms example script that was supplied with smstools. I have created user 'test' on this host (kello.ru). After I've created .procmailrc file in his home directory: Now I see in /var/log/maillog: I can send sms using smssend command. But no message arrives when I'm sending e-mail to test@kello.ru. No new files appears in /var/spool/sms/* Only this strange messages in smsd.logfile: Could anybody point me to solution of this problem? Any help will be appreciated! TIA
|
|
#2 Fri Jul 23, 2010 12:25, 179 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Hiisi wrote Now I see in /var/log/maillog:
Try this: # chmod 0640 /home/test/.procmailrcAlso check who owns the file, and change it if it's not owned by user test. And check that /home/test is owned by test:test. Hiisi wrote I can send sms using smssend command. But no message arrives when I'm sending e-mail to test@kello.ru. No new files appears in /var/spool/sms/* Only this strange messages in smsd.logfile: smssend? It's not a program from Smstools. Probably you have another SMS daemon running. It may also cause that "Input/output error", which means that the device is not usable. Check if another process is using your modem, and try to stop it. Also check what ports were provided when you plugged your modem (using dmesg), and if there is more than one port, try with another one.
|
|
#3 Sun Jul 25, 2010 11:04, 179 months ago.
|
Member
Registered: Jul 2010
Location: Moscow, Russian Federation
Topic owner
|
keke wrote Hiisi wrote Now I see in /var/log/maillog:
Try this: # chmod 0640 /home/test/.procmailrcAlso check who owns the file, and change it if it's not owned by user test. And check that /home/test is owned by test:test.
Done that. It has been owned by root. But still having the same warnings in /var/log/maillog keke wrote smssend? It's not a program from Smstools. Probably you have another SMS daemon running.
keke wrote It may also cause that "Input/output error", which means that the device is not usable. Check if another process is using your modem, and try to stop it.
Sorry, I don't know how to do that keke wrote Also check what ports were provided when you plugged your modem (using dmesg), and if there is more than one port, try with another one.
From dmesg output: When I pug in this modem there's always 3 new devices: /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2or /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3Or sometimes (like in the output above): /dev/ttyUSB0 /dev/ttyUSB2 /dev/ttyUSB3It doesn't matter which one I use in /etc/smsd.conf. So, I've created 3 devices: It causes errors like this one: But anyway, it works Still can't find solution to my problem Kiitos, keke.
|
|
#4 Sun Jul 25, 2010 12:44, 179 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Hiisi wrote keke wrote Hiisi wrote Now I see in /var/log/maillog:
Try this: # chmod 0640 /home/test/.procmailrcAlso check who owns the file, and change it if it's not owned by user test. And check that /home/test is owned by test:test.
Done that. It has been owned by root. But still having the same warnings in /var/log/maillog
I have to say that I do not know what causes the trouble in your server. In my server the file .procmailrc is -rw-r--r-- and owned by user:user. Email2sms works as expected. If you changed permissions to 0640, you could try once more with 0644. As I do not know how to fix this issue, you could try to find a solution with Google, search something like " procmail Suspicious rcfile .procmailrc". It seems that this is a common problem. Hiisi wrote keke wrote smssend? It's not a program from Smstools. Probably you have another SMS daemon running.
Perhaps Fedora package has changed something, I cannot check it right now because I have no FC installed. If that smssend is a script, does it place files into /var/spool/sms/outgoing directory? Hiisi wrote keke wrote It may also cause that "Input/output error", which means that the device is not usable. Check if another process is using your modem, and try to stop it.
Sorry, I don't know how to do that 
First stop the smsd if it's running. Then check if a device is symbolic link: # ls -l /dev/ttyUSB0 lr-xr-xr-x 1 root root 9 Jul 5 14:40 /dev/ttyUSB0 -> usb/tts/0In my case it's a link. Check if any process is using that device: # lsof | grep usb/tts/0 smsd 31409 root 6u CHR 188,0 827 /dev/usb/tts/0In my case smsd is using it, because I did not stop it. You should not see any processes. Hiisi wrote keke wrote Also check what ports were provided when you plugged your modem (using dmesg), and if there is more than one port, try with another one.
From dmesg output: When I pug in this modem there's always 3 new devices: /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2or /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3Or sometimes (like in the output above): /dev/ttyUSB0 /dev/ttyUSB2 /dev/ttyUSB3It doesn't matter which one I use in /etc/smsd.conf. So, I've created 3 devices: It causes errors like this one: But anyway, it works Still can't find solution to my problem 
Use one port only, because those are interfaces to the same device. In some cases only a certain port was working with AT commands. When in your case any port is working, just select single one. If possible and necessary, use udev to keep the names of ports the same. Hiisi wrote Kiitos, keke.
Ole hyvä.
|
|
#5 Mon Jul 26, 2010 08:01, 179 months ago.
|
Member
Registered: Jul 2010
Location: Moscow, Russian Federation
Topic owner
|
keke wrote I have to say that I do not know what causes the trouble in your server.
In my server the file .procmailrc is -rw-r--r-- and owned by user:user. Email2sms works as expected. If you changed permissions to 0640, you could try once more with 0644.
As I do not know how to fix this issue, you could try to find a solution with Google, search something like "procmail Suspicious rcfile .procmailrc". It seems that this is a common problem.
Now I have: But still having the same warnings in /var/log/maillog... keke wrote Perhaps Fedora package has changed something, I cannot check it right now because I have no FC installed. If that smssend is a script, does it place files into /var/spool/sms/outgoing directory?
Yes, it does. keke wrote First stop the smsd if it's running. Then check if a device is symbolic link:
# ls -l /dev/ttyUSB0 lr-xr-xr-x 1 root root 9 Jul 5 14:40 /dev/ttyUSB0 -> usb/tts/0
In my case it's a link. Check if any process is using that device:
# lsof | grep usb/tts/0 smsd 31409 root 6u CHR 188,0 827 /dev/usb/tts/0
In my case smsd is using it, because I did not stop it. You should not see any processes.
Thanks for the hint. No other process is using it. keke wrote Use one port only, because those are interfaces to the same device. In some cases only a certain port was working with AT commands. When in your case any port is working, just select single one.
If possible and necessary, use udev to keep the names of ports the same.
I have created the following udev rule: Now when I plug in the device /dev/modem file appears but ownership is wrong: I can't understand why GROUP option doesn't work as expected. The bus /dev/modem refer to has right permissions:
|
|
#6 Mon Jul 26, 2010 08:10, 179 months ago.
|
Member
Registered: Jul 2010
Location: Moscow, Russian Federation
Topic owner
|
Forgot to mention that smssend doesn't work with /dev/modem in /etc/smsd.conf, even running as root. I have a lot of entries like this in smsd' logfile: Everything works as expected when using /dev/ttyUSB0 in config file.
|
|
#7 Mon Jul 26, 2010 12:00, 179 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
I do not have more hints on how to get procmail to work in your server. But I believe that Google will help you. The GROUP option in your udev rule works, but it has no effect with symlink. Try this kind of a rule, it's from my server which is running Ubuntu 9.04: Those rules creates the following: # ls -l /dev/controller0 /dev/modem* lrwxrwxrwx 1 root root 7 2010-07-26 14:41 /dev/controller0 -> ttyUSB0 lrwxrwxrwx 1 root root 7 2010-07-26 14:43 /dev/modem0 -> ttyUSB1 lrwxrwxrwx 1 root root 7 2010-07-26 14:30 /dev/modem1 -> ttyUSB2# ls -l /dev/ttyUSB* crw------- 1 smsd dialout 188, 0 2010-07-26 14:41 /dev/ttyUSB0 crw-rw---- 1 smsd dialout 188, 1 2010-07-26 14:43 /dev/ttyUSB1 crw-rw---- 1 smsd dialout 188, 2 2010-07-26 14:31 /dev/ttyUSB2Smsd uses /dev/modem* and works as with /dev/ttyUSB*.
|
|
#8 Mon Jul 26, 2010 13:12, 179 months ago.
|
Member
Registered: Jul 2010
Location: Moscow, Russian Federation
Topic owner
|
I have added the following rule: And now smsd starts perfectly. It works as expected until strange thing occurs: modem disconnects by itself. Here's dmesg' output: In some other thread I saw you told the OS causes this. So, I have asked this question on Fedora' mailing list. Hope will get support there soon. As for the problem with warnings about suspicious .procmailrc fail, I've found solution to it. it was wrong test' user home directory permissions that caused this. I had to make sure it's writeable only by user itself (and not by its group). Anyway, thanks for fast and useful support, Keijo. Appreciate that!
|
This topic is locked
Page: 1
Time in this board is UTC.
|
|
|
 |
|
 |
|