qmail error

15 views
Skip to first unread message

jagdish bairagi

unread,
Oct 24, 2009, 8:27:31 AM10/24/09
to VG...@googlegroups.com

When runs this script i am getting this error

"./run: line 10: syntax error near unexpected token `fi'
./run: line 10: `fi'"

please correct syntax


SCRIPT

  1. #!/bin/sh
  2. QMAILDUID=`id -u qmaild`
  3. NOFILESGID=`id -g qmaild`
  4. MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
  5. LOCAL=`head -1 /var/qmail/control/me`
  6. if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; th
  7.     echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
  8.     echo /var/qmail/supervise/qmail-smtpd/run
  9.     exit 1
  10. fi
  11. if [ ! -f /var/qmail/control/rcpthosts ]; then
  12.     echo "No /var/qmail/control/rcpthosts!"
  13.     echo "Refusing to start SMTP listener because it'll create an open relay"
  14.     exit 1
  15. fi
  16. exec /usr/local/bin/softlimit -m 2000000 \
  17. /usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
  18. -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
                                                           


dhaval thakar

unread,
Oct 25, 2009, 12:02:59 PM10/25/09
to vg...@googlegroups.com
check line 6,
there should be then
--
Regards
Dhaval Thakar
http://www.linuxreaders.com/

vilas jagani

unread,
Oct 25, 2009, 11:33:09 PM10/25/09
to vg...@googlegroups.com
Hi ,

check with below codes.


!/bin/sh


QMAILDUID=`id -u qmaild`

NOFILESGID=`id -g qmaild`

MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`

LOCAL=`head -1 /var/qmail/control/me`


if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then

echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in

echo /var/qmail/supervise/qmail-smtpd/run

exit 1

fi


if [ ! -f /var/qmail/control/rcpthosts ]; then

echo "No /var/qmail/control/rcpthosts!"

echo "Refusing to start SMTP listener because it'll create an open relay"

exit 1

fi


exec /usr/local/bin/softlimit -m 2000000 \

/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \

-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1



Regards,
Vilash Jagani





--- On Sat, 10/24/09, jagdish bairagi <jbte...@gmail.com> wrote:

Jigar Raval

unread,
Oct 25, 2009, 11:41:47 PM10/25/09
to vg...@googlegroups.com
Hello,

Check the script OR there is no copy-paste mistake then i felt that "then" is not written properly "th" is written, chage to then and check agai.


Jigar

--- On Mon, 10/26/09, vilas jagani <vilas_ja...@yahoo.com> wrote:
> exit 1fiif [ ! -f
> /var/qmail/control/rcpthosts ];
> then echo "No
> /var/qmail/control/rcpthosts!"
> echo "Refusing to start SMTP
> listener because it'll create an open
> relay" exit
> 1fiexec /usr/local/bin/softlimit -m
> \
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> >
>
>
>



jagdish bairagi

unread,
Oct 26, 2009, 1:32:00 AM10/26/09
to VG...@googlegroups.com
OK  "then" is correct but now
 showing last line syntex error

On Sat, Oct 24, 2009 at 5:57 PM, jagdish bairagi <jbte...@gmail.com> wrote:

Jigar Raval

unread,
Oct 26, 2009, 1:57:22 AM10/26/09
to vg...@googlegroups.com
I tried ur script by adding then on my machine it is not showing any
error. What is last line syntex error ?

Jigar
--- On Mon, 10/26/09, jagdish bairagi <jbte...@gmail.com> wrote:

> From: jagdish bairagi <jbte...@gmail.com>
> Subject: [VGLUG] Re: qmail error
> To: VG...@googlegroups.com
> 1fiif [ ! -f /var/qmail/control/rcpthosts
> ]; then echo "No
> /var/qmail/control/rcpthosts!"
>
> echo "Refusing to start SMTP listener
> because it'll create an open relay"
> exit 1fiexec /usr/local/bin/softlimit -m

jagdish bairagi

unread,
Oct 26, 2009, 2:49:17 AM10/26/09
to vg...@googlegroups.com
I Modified script such like
error below

./run: line 20: syntax error: unexpected end of file


#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then

    echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
    echo /var/qmail/supervise/qmail-smtpd/run
    exit 1
fi
if [ ! -f /var/qmail/control/rcpthosts ]; then
    echo "No /var/qmail/control/rcpthosts!"
    echo "Refusing to start SMTP listener because it'll create an open relay"
    exit 1
fi
if

exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1

Shakthi Kannan

unread,
Oct 26, 2009, 3:10:52 AM10/26/09
to vg...@googlegroups.com
Hi,

--- On Mon, Oct 26, 2009 at 12:19 PM, jagdish bairagi
<jbte...@gmail.com> wrote:
| ...


| if [ ! -f /var/qmail/control/rcpthosts ]; then
|     echo "No /var/qmail/control/rcpthosts!"
|     echo "Refusing to start SMTP listener because it'll create an open
| relay"
|     exit 1
| fi
| if
| exec /usr/local/bin/softlimit -m 2000000 \
| /usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
| "$MAXSMTPD" \
| -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1

\--

Where is the condition check for the last "if", and the closing "fi" for it?

SK

--
Shakthi Kannan
http://www.shakthimaan.com

Jigar Raval

unread,
Oct 26, 2009, 3:36:08 AM10/26/09
to vg...@googlegroups.com
I think it is issue with script written. Again if is added but not required to add and not completed the loop. remove if and try.

> if
> exec /usr/local/bin/softlimit -m 2000000 \

jagdish bairagi

unread,
Oct 26, 2009, 5:57:52 AM10/26/09
to vg...@googlegroups.com
Now script showing this I think it is correct

[root@mail qmail-smtpd]# ./run
/var/qmail/supervise/qmail-smtpd/run
[root@mail qmail-smtpd]#

jagdish bairagi

unread,
Oct 28, 2009, 6:11:47 AM10/28/09
to VG...@googlegroups.com
Dear

I configure qmail with dovecot
dovecot is running currect but mail doesn't send recieve mail
through webmail 0r thunderbird

imap smtp listening

Alok Thaker

unread,
Oct 28, 2009, 6:20:06 AM10/28/09
to vg...@googlegroups.com
Have you configured imap with dovecot. Did you check the mail logs for more analysis.What does it show ?

Thanks,
Alok
Inferno Solutions !
Go with the best !
www.inferno.co.in !
M:-9925519798 !
All Linux-Java Solutions-Training under one Roof !

Nirmal Pathak

unread,
Oct 28, 2009, 6:20:20 AM10/28/09
to vg...@googlegroups.com
2009/10/28 jagdish bairagi <jbte...@gmail.com>:

Provide some logs regarding the issue, so someone can help.

Have FuN!
--
Nirmal D Pathak.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What I want is freedom, not life, nor pleasure, nor good!

FLOSS gives that.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

jagdish bairagi

unread,
Oct 28, 2009, 6:56:05 AM10/28/09
to vg...@googlegroups.com
I configured dovecot i can send mail through webclient but mail goes in users home directory /home/redhat/Mailbox i want mail in webclient inbox

some logs here

Oct 28 16:22:19 mail sendmail[12455]: n9SAqJ9k012455: Authentication-Warning: mail.ntpl.com: apache set sender to jagdish@localhost using -f
Oct 28 16:22:19 mail sendmail[12455]: n9SAqJ9k012455: from=jagdish@localhost, size=517, class=0, nrcpts=1, msgid=<47314.172.16.4.54....@172.16.4.54>, relay=apache@localhost
Oct 28 16:22:20 mail sendmail[12455]: n9SAqJ9k012455: to=red...@mail.ntpl.com, ctladdr=jagdish@localhost (500/501), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30517, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (ok 1256727140 qp 12462)

jagdish bairagi

unread,
Oct 28, 2009, 6:58:21 AM10/28/09
to vg...@googlegroups.com

Alok Thaker

unread,
Oct 28, 2009, 7:00:15 AM10/28/09
to vg...@googlegroups.com
What is your webclient is it webmail/squirrel/zimbra/outlook express/outlook.  Webmail reads from the users home directory only.

Thanks,
Alok
Inferno Solutions !
Go with the best !
www.inferno.co.in !
M:-9925519798 !
All Linux-Java Solutions-Training under one Roof !


jagdish bairagi

unread,
Oct 28, 2009, 7:01:54 AM10/28/09
to vg...@googlegroups.com
webclint is WEBMAIL and i also used evolution

jagdish bairagi

unread,
Oct 28, 2009, 7:05:47 AM10/28/09
to vg...@googlegroups.com
My dovecot file configuration is attached please check it out
dovecot.conf

Bhavin Mehta

unread,
Oct 28, 2009, 7:05:52 AM10/28/09
to vg...@googlegroups.com
Hi,

Search below line in dovecot.conf file and remove # and start dovecot service

mail_location = mbox:~/mail:INBOX=/var/mail/%u

On Wed, Oct 28, 2009 at 4:31 PM, jagdish bairagi <jbte...@gmail.com> wrote:



--
Thanks,
Bhavin Mehta
Complitech Solution Pvt. Ltd.
(www.complitech.net)


Bhavin Mehta

unread,
Oct 28, 2009, 7:13:01 AM10/28/09
to vg...@googlegroups.com

Hi,

No need to change already # is remove

jagdish bairagi

unread,
Oct 28, 2009, 7:13:57 AM10/28/09
to vg...@googlegroups.com
I modified file and then login i found error
following logs

dovecot: IMAP(redhat): Failed to create storage with data: mbox:/var/mail/redhat:INDEX=/var/indexes/redhat
dovecot: Error: child 18491 (imap) returned error 89
dovecot: Info: imap-login: Login: user=<redhat>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: IMAP(jagdish): Disconnected: Logged out
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: IMAP(jagdish): Disconnected
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Error: IMAP(jagdish): open(/var/mail/jagdish/inbox, O_CREAT) failed: Not a directory
dovecot: Error: IMAP(jagdish): mkdir_parents(/var/indexes/jagdish/.imap/INBOX) failed: Permission denied
dovecot: Info: IMAP(jagdish): Disconnected

jagdish bairagi

unread,
Oct 28, 2009, 7:34:20 AM10/28/09
to vg...@googlegroups.com

when i login in web mail this log is showing

dovecot: Info: IMAP(jagdish): Disconnected: Logged out
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: IMAP(jagdish): Disconnected: Logged out
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: IMAP(jagdish): Disconnected: Logged out
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: IMAP(jagdish): Disconnected: Logged out
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Error: IMAP(jagdish): open() failed with mbox file /var/mail/jagdish: Is a directory

dovecot: Info: IMAP(jagdish): Disconnected: Logged out
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Error: IMAP(jagdish): open() failed with mbox file /var/mail/jagdish: Is a directory

dovecot: Info: IMAP(jagdish): Disconnected
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: IMAP(jagdish): Disconnected: Logged out
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: IMAP(jagdish): Disconnected: Logged out
dovecot: Info: imap-login: Login: user=<jagdish>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Info: IMAP(jagdish): Disconnected: Logged out

Jigar Raval

unread,
Oct 28, 2009, 11:44:07 PM10/28/09
to vg...@googlegroups.com
It appears to be error related to secure imap configuration.
Kindly check webmail configuration to support secure imap connection or run imap with ssl/tsl

Jigar


--- On Wed, 10/28/09, jagdish bairagi <jbte...@gmail.com> wrote:

> From: jagdish bairagi <jbte...@gmail.com>
> Subject: [VGLUG] Re: qmail error
> To: vg...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages