# File lib/protocols/smtpserver.rb, line 266
266:                 def process_auth str
267:                         if @state.include?(:auth)
268:                                 send_data "503 auth already issued\r\n"
269:                         elsif str =~ /\APLAIN\s+/i
270:                                 plain = ($'.dup).unpack("m").first # Base64::decode64($'.dup)
271:                                 discard,user,psw = plain.split("\000")
272:                                 if receive_plain_auth user,psw
273:                                         send_data "235 authentication ok\r\n"
274:                                         @state << :auth
275:                                 else
276:                                         send_data "535 invalid authentication\r\n"
277:                                 end
278:                         #elsif str =~ /\ALOGIN\s+/i
279:                         else
280:                                 send_data "504 auth mechanism not available\r\n"
281:                         end
282:                 end